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/Email.json
T
2013-11-06 13:31:09 +02:00

98 lines
2.3 KiB
JSON
Executable File

{
"fields": {
"subject": {
"type": "varchar",
"required": true
},
"from": {
"type": "varchar",
"db": false
},
"to": {
"type": "varchar",
"db": false
},
"cc": {
"type": "varchar",
"db": false
},
"bcc": {
"type": "varchar",
"db": false
},
"body": {
"type": "text"
},
"status": {
"type": "varchar"
},
"attachments": {
"type": "linkMultiple"
},
"parent": {
"type": "linkParent"
},
"dateSent": {
"type": "datetime",
"default": "javascript: return this.dateTime.getNow(15);"
},
"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"
},
"attachments": {
"type": "hasChildren",
"entity": "Attachment",
"foreign": "parent"
},
"parent": {
"type": "belongsToParent",
"entities": ["Account", "Opportunity", "Case"],
"foreign": "attachments"
}
},
"collection": {
"sortBy": "dateSent",
"asc": false,
"boolFilters": ["onlyMy"]
}
}