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/Modules/Crm/Metadata/entityDefs/Case.json
T
2013-11-06 13:31:09 +02:00

112 lines
2.7 KiB
JSON
Executable File

{
"fields": {
"name": {
"type": "varchar",
"required": true
},
"number": {
"type": "autoincrement"
},
"status": {
"type": "enum",
"options": ["New", "Assigned", "Pending", "Closed", "Rejected", "Duplicate"],
"default": "New"
},
"priority": {
"type": "enum",
"options": ["Low", "Normal", "High", "Urgent"],
"default": "Normal"
},
"type": {
"type": "enum",
"options": ["", "Question", "Incident", "Problem"]
},
"description": {
"type": "text"
},
"account": {
"type": "link"
},
"contact": {
"type": "link"
},
"createdAt": {
"type": "datetime",
"readOnly": true
},
"modifiedAt": {
"type": "datetime",
"readOnly": true
},
"createdBy": {
"type": "link",
"readOnly": true
},
"modifiedBy": {
"type": "link",
"readOnly": true
},
"assignedUser": {
"type": "link",
"required": true,
"default": "javascript: return {assignedUserId: this.getUser().id, assignedUserName: this.getUser().get(\"name\")};"
},
"teams": {
"type": "linkMultiple"
}
},
"links": {
"createdBy": {
"type": "belongsTo",
"entity": "User"
},
"modifiedBy": {
"type": "belongsTo",
"entity": "User"
},
"assignedUser": {
"type": "belongsTo",
"entity": "User"
},
"teams": {
"type": "hasMany",
"entity": "Team"
},
"account": {
"type": "belongsTo",
"entity": "Account",
"foreign": "cases"
},
"contact": {
"type": "belongsTo",
"entity": "Contact",
"foreign": "cases"
},
"meetings": {
"type": "hasChildren",
"entity": "Meeting",
"foreign": "parent"
},
"calls": {
"type": "hasChildren",
"entity": "Call",
"foreign": "parent"
},
"tasks": {
"type": "hasChildren",
"entity": "Task",
"foreign": "parent"
},
"emails": {
"type": "hasChildren",
"entity": "Email",
"foreign": "parent"
}
},
"collection": {
"sortBy": "number",
"asc": false,
"boolFilters": ["onlyMy", "open"]
}
}