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/Task.json
T
2018-10-22 15:11:06 +03:00

163 lines
4.2 KiB
JSON

{
"fields": {
"name": {
"type": "varchar",
"required": true,
"trim": true
},
"status": {
"type": "enum",
"options": ["Not Started", "Started", "Completed", "Canceled", "Deferred"],
"view": "views/fields/enum-styled",
"style": {
"Completed": "success"
},
"default": "Not Started",
"audited": true
},
"priority": {
"type": "enum",
"options": ["Low", "Normal", "High", "Urgent"],
"default": "Normal",
"audited": true
},
"dateStart": {
"type": "datetimeOptional",
"before": "dateEnd"
},
"dateEnd": {
"type": "datetimeOptional",
"after": "dateStart",
"view": "crm:views/task/fields/date-end",
"audited": true
},
"dateStartDate": {
"type": "date",
"disabled": true
},
"dateEndDate": {
"type": "date",
"disabled": true
},
"dateCompleted": {
"type": "datetime",
"readOnly": true
},
"isOverdue": {
"type": "bool",
"readOnly": true,
"notStorable": true,
"view": "crm:views/task/fields/is-overdue",
"disabled": true
},
"reminders": {
"type": "jsonArray",
"notStorable": true,
"view": "crm:views/meeting/fields/reminders"
},
"description": {
"type": "text"
},
"parent": {
"type": "linkParent",
"entityList": ["Account", "Contact", "Lead", "Opportunity", "Case"]
},
"account": {
"type": "link",
"readOnly": true
},
"contact": {
"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",
"required": true,
"view": "views/fields/assigned-user"
},
"teams": {
"type": "linkMultiple",
"view": "views/fields/teams"
},
"attachments": {
"type": "attachmentMultiple",
"sourceList": ["Document"]
}
},
"links": {
"createdBy": {
"type": "belongsTo",
"entity": "User"
},
"modifiedBy": {
"type": "belongsTo",
"entity": "User"
},
"assignedUser": {
"type": "belongsTo",
"entity": "User",
"foreign": "tasks"
},
"teams": {
"type": "hasMany",
"entity": "Team",
"relationName": "entityTeam",
"layoutRelationshipsDisabled": true
},
"parent": {
"type": "belongsToParent",
"foreign": "tasks"
},
"account": {
"type": "belongsTo",
"entity": "Account"
},
"contact": {
"type": "belongsTo",
"entity": "Contact"
}
},
"collection": {
"orderBy": "createdAt",
"order": "desc"
},
"indexes": {
"dateStartStatus": {
"columns": ["dateStart", "status"]
},
"dateEndStatus": {
"columns": ["dateEnd", "status"]
},
"dateStart": {
"columns": ["dateStart", "deleted"]
},
"status": {
"columns": ["status", "deleted"]
},
"assignedUser": {
"columns": ["assignedUserId", "deleted"]
},
"assignedUserStatus": {
"columns": ["assignedUserId", "status"]
}
}
}