This repository has been archived on 2026-07-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
espocrm-base/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Case.json
T
2018-10-22 15:11:06 +03:00

183 lines
4.7 KiB
JSON

{
"fields": {
"name": {
"type": "varchar",
"required": true,
"trim": true
},
"number": {
"type": "autoincrement",
"index": true
},
"status": {
"type": "enum",
"options": ["New", "Assigned", "Pending", "Closed", "Rejected", "Duplicate"],
"default": "New",
"view": "views/fields/enum-styled",
"style": {
"Closed": "success",
"Duplicate": "danger",
"Rejected": "danger"
},
"audited": true
},
"priority": {
"type": "enum",
"options": ["Low", "Normal", "High", "Urgent"],
"default": "Normal",
"audited": true
},
"type": {
"type": "enum",
"options": ["", "Question", "Incident", "Problem"],
"default": "",
"audited": true
},
"description": {
"type": "text"
},
"account": {
"type": "link"
},
"lead": {
"type": "link"
},
"contact": {
"type": "link",
"view": "crm:views/case/fields/contact"
},
"contacts": {
"type": "linkMultiple",
"view": "crm:views/case/fields/contacts",
"orderBy": "name"
},
"inboundEmail": {
"type": "link",
"readOnly": true
},
"createdAt": {
"type": "datetime",
"readOnly": true
},
"modifiedAt": {
"type": "datetime",
"readOnly": true
},
"createdBy": {
"type": "link",
"readOnly": true,
"view": "views/fields/user"
},
"modifiedBy": {
"type": "link",
"readOnly": true,
"view": "views/fields/user"
},
"assignedUser": {
"type": "link",
"view": "views/fields/assigned-user"
},
"teams": {
"type": "linkMultiple",
"view": "views/fields/teams"
},
"attachments": {
"type": "attachmentMultiple"
}
},
"links": {
"createdBy": {
"type": "belongsTo",
"entity": "User"
},
"modifiedBy": {
"type": "belongsTo",
"entity": "User"
},
"assignedUser": {
"type": "belongsTo",
"entity": "User"
},
"teams": {
"type": "hasMany",
"entity": "Team",
"relationName": "entityTeam",
"layoutRelationshipsDisabled": true
},
"inboundEmail": {
"type": "belongsTo",
"entity": "InboundEmail"
},
"account": {
"type": "belongsTo",
"entity": "Account",
"foreign": "cases"
},
"lead": {
"type": "belongsTo",
"entity": "Lead",
"foreign": "cases"
},
"contact": {
"type": "belongsTo",
"entity": "Contact",
"foreign": "casesPrimary"
},
"contacts": {
"type": "hasMany",
"entity": "Contact",
"foreign": "cases",
"layoutRelationshipsDisabled": true
},
"meetings": {
"type": "hasChildren",
"entity": "Meeting",
"foreign": "parent",
"layoutRelationshipsDisabled": true,
"audited": true
},
"calls": {
"type": "hasChildren",
"entity": "Call",
"foreign": "parent",
"layoutRelationshipsDisabled": true,
"audited": true
},
"tasks": {
"type": "hasChildren",
"entity": "Task",
"foreign": "parent",
"layoutRelationshipsDisabled": true,
"audited": true
},
"emails": {
"type": "hasChildren",
"entity": "Email",
"foreign": "parent",
"layoutRelationshipsDisabled": true
},
"articles": {
"type": "hasMany",
"entity": "KnowledgeBaseArticle",
"foreign": "cases",
"audited": true
}
},
"collection": {
"orderBy": "number",
"order": "desc",
"textFilterFields": ["name", "number"]
},
"indexes": {
"status": {
"columns": ["status", "deleted"]
},
"assignedUser": {
"columns": ["assignedUserId", "deleted"]
},
"assignedUserStatus": {
"columns": ["assignedUserId", "status"]
}
}
}