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/Document.json
T
2015-05-28 16:19:37 +03:00

119 lines
3.0 KiB
JSON

{
"fields": {
"name": {
"type": "varchar",
"required": true,
"view": "Crm:Document.Fields.Name"
},
"file": {
"type": "file",
"required": true,
"view": "Crm:Document.Fields.File"
},
"status": {
"type": "enum",
"options": ["Active", "Draft", "Expired", "Canceled"],
"view": "Fields.EnumStyled",
"style": {
"Canceled": "danger",
"Expired": "danger"
}
},
"source": {
"type": "enum",
"options": ["Espo"],
"default": "Espo"
},
"type": {
"type": "enum",
"options": ["", "Contract", "NDA", "EULA", "License Agreement"]
},
"publishDate": {
"type": "date",
"required": true,
"default": "javascript: return this.dateTime.getToday();"
},
"expirationDate": {
"type": "date",
"after": "publishDate"
},
"description": {
"type": "text"
},
"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"
},
"accounts": {
"type": "linkMultiple",
"layoutDetailDisabled": true,
"layoutListDisabled": true,
"layoutMassUpdateDisabled": true,
"importDisabled": true,
"noLoad": true
},
"folder": {
"type": "link",
"view": "Fields.LinkCategoryTree"
}
},
"links": {
"accounts": {
"type": "hasMany",
"entity": "Account",
"foreign": "documents"
},
"opportunities": {
"type": "hasMany",
"entity": "Opportunity",
"foreign": "documents"
},
"createdBy": {
"type": "belongsTo",
"entity": "User"
},
"modifiedBy": {
"type": "belongsTo",
"entity": "User"
},
"assignedUser": {
"type": "belongsTo",
"entity": "User"
},
"teams": {
"type": "hasMany",
"entity": "Team",
"relationName": "entityTeam",
"layoutRelationshipsDisabled": true
},
"folder": {
"type": "belongsTo",
"foreign": "documents",
"entity": "DocumentFolder"
}
},
"collection": {
"sortBy": "createdAt",
"asc": false
}
}