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

154 lines
3.7 KiB
JSON
Executable File

{
"fields": {
"name": {
"type": "varchar",
"required": true
},
"website": {
"type": "url"
},
"email": {
"type": "email"
},
"phone": {
"type": "phone"
},
"fax": {
"type": "phone"
},
"type": {
"type": "enum",
"options": ["", "Customer", "Investor", "Partner", "Reseller"]
},
"industry": {
"type": "enum",
"options": ["", "Apparel", "Banking", "Education", "Electronics", "Finance", "Insurance", "IT"]
},
"sicCode": {
"type": "varchar",
"maxLength": 40
},
"billingAddress": {
"type": "address"
},
"billingAddressStreet": {
"type": "varchar"
},
"billingAddressCity": {
"type": "varchar"
},
"billingAddressState": {
"type": "varchar"
},
"billingAddressCountry": {
"type": "varchar"
},
"billingAddressPostalCode": {
"type": "varchar"
},
"shippingAddress": {
"type": "address"
},
"shippingAddressStreet": {
"type": "varchar"
},
"shippingAddressCity": {
"type": "varchar"
},
"shippingAddressState": {
"type": "varchar"
},
"shippingAddressCountry": {
"type": "varchar"
},
"shippingAddressPostalCode": {
"type": "varchar"
},
"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,
"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"
},
"contacts": {
"type": "hasMany",
"entity": "Contact",
"foreign": "account"
},
"opportunities": {
"type": "hasMany",
"entity": "Opportunity",
"foreign": "account"
},
"cases": {
"type": "hasMany",
"entity": "Case",
"foreign": "account"
},
"meetings": {
"type": "hasChildren",
"entity": "Meeting",
"foreign": "parent"
},
"calls": {
"type": "hasChildren",
"entity": "Call",
"foreign": "parent"
},
"tasks": {
"type": "hasChildren",
"entity": "Task",
"foreign": "parent"
},
"emails": {
"type": "hasChildren",
"entity": "Email",
"foreign": "parent"
}
},
"collection": {
"sortBy": "name",
"asc": true,
"boolFilters": ["onlyMy"]
}
}