salix/services/client/common/models/Address.json

78 lines
1.4 KiB
JSON

{
"name": "Address",
"base": "MyModel",
"validateUpsert": true,
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"consignee": {
"type": "string",
"required": true
},
"street": {
"type": "string",
"required": true
},
"city": {
"type": "string",
"required": true
},
"postcode": {
"type": "string"
},
"phone": {
"type": "string"
},
"mobile": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"default": {
"type": "boolean"
},
"longitude": {
"type": "Number"
},
"latitude": {
"type": "Number"
}
},
"validations": [],
"relations": {
"province": {
"type": "belongsTo",
"model": "Province",
"foreignKey": "provinceFk"
},
"client": {
"type": "belongsTo",
"model": "Client",
"foreignKey": "clientFk"
},
"defaultAgency": {
"type": "belongsTo",
"model": "Agency",
"foreignKey": "defaultAgencyFk"
}
},
"acls": [
{
"accessType": "*",
"principalType": "ROLE",
"principalId": "$authenticated",
"permission": "ALLOW"
},
{
"accessType": "*",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "DENY"
}
]
}