156 lines
3.9 KiB
JSON
156 lines
3.9 KiB
JSON
{
|
|
"fields": {
|
|
"name": {
|
|
"type": "varchar",
|
|
"required": true
|
|
},
|
|
"number": {
|
|
"type": "autoincrement",
|
|
"index": true
|
|
},
|
|
"status": {
|
|
"type": "enum",
|
|
"options": ["New", "Assigned", "Pending", "Closed", "Rejected", "Duplicate"],
|
|
"default": "New",
|
|
"view": "Fields.EnumStyled",
|
|
"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"],
|
|
"audited": true
|
|
},
|
|
"description": {
|
|
"type": "text"
|
|
},
|
|
"account": {
|
|
"type": "link"
|
|
},
|
|
"contact": {
|
|
"type": "link",
|
|
"view": "Crm:Case.Fields.Contact"
|
|
},
|
|
"contacts": {
|
|
"type": "linkMultiple",
|
|
"view": "crm:views/case/fields/contacts"
|
|
},
|
|
"inboundEmail": {
|
|
"type": "link",
|
|
"readOnly": true
|
|
},
|
|
"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
|
|
},
|
|
"teams": {
|
|
"type": "linkMultiple"
|
|
}
|
|
},
|
|
"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"
|
|
},
|
|
"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
|
|
},
|
|
"calls": {
|
|
"type": "hasChildren",
|
|
"entity": "Call",
|
|
"foreign": "parent",
|
|
"layoutRelationshipsDisabled": true
|
|
},
|
|
"tasks": {
|
|
"type": "hasChildren",
|
|
"entity": "Task",
|
|
"foreign": "parent",
|
|
"layoutRelationshipsDisabled": true
|
|
},
|
|
"emails": {
|
|
"type": "hasChildren",
|
|
"entity": "Email",
|
|
"foreign": "parent",
|
|
"layoutRelationshipsDisabled": true
|
|
}
|
|
},
|
|
"collection": {
|
|
"sortBy": "number",
|
|
"asc": false
|
|
},
|
|
"indexes": {
|
|
"status": {
|
|
"columns": ["status", "deleted"]
|
|
},
|
|
"assignedUser": {
|
|
"columns": ["assignedUserId", "deleted"]
|
|
},
|
|
"assignedUserStatus": {
|
|
"columns": ["assignedUserId", "status"]
|
|
}
|
|
}
|
|
}
|