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/Resources/metadata/entityDefs/Attachment.json
T
2024-04-20 21:47:38 +03:00

108 lines
2.6 KiB
JSON

{
"fields": {
"name": {
"type": "varchar",
"required": true,
"view": "views/attachment/fields/name",
"maxLength": 255
},
"type": {
"type": "varchar",
"maxLength": 100
},
"size": {
"type": "int",
"dbType": "bigint",
"min": 0
},
"parent": {
"type": "linkParent",
"view": "views/attachment/fields/parent"
},
"related": {
"type": "linkParent",
"noLoad": true,
"view": "views/attachment/fields/parent",
"validatorClassName": "Espo\\Classes\\FieldValidators\\Attachment\\Related"
},
"source": {
"type": "link",
"readOnly": true,
"utility": true
},
"field": {
"type": "varchar",
"utility": true
},
"isBeingUploaded": {
"type": "bool",
"default": false
},
"createdAt": {
"type": "datetime",
"readOnly": true
},
"createdBy": {
"type": "link",
"readOnly": true
},
"contents": {
"type": "text",
"notStorable": true,
"sanitizerClassNameList": [],
"sanitizerSuppressClassNameList": [
"Espo\\Classes\\FieldSanitizers\\EmptyStringToNull"
]
},
"role": {
"type": "enum",
"maxLength": 36,
"options": [
"Attachment",
"Inline Attachment",
"Import File",
"Export File",
"Mail Merge",
"Mass Pdf"
]
},
"storage": {
"type": "varchar",
"maxLength": 24,
"default": null
},
"storageFilePath": {
"type": "varchar",
"maxLength": 260,
"default": null
},
"global": {
"type": "bool",
"default": false
}
},
"links": {
"createdBy": {
"type": "belongsTo",
"entity": "User"
},
"parent": {
"type": "belongsToParent",
"foreign": "attachments"
},
"related": {
"type": "belongsToParent"
}
},
"collection": {
"orderBy": "createdAt",
"order": "desc"
},
"indexes": {
"parent": {
"columns": ["parentType", "parentId"]
}
},
"sourceList": ["Document"]
}