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

81 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"
},
"isEnabled": {
"type": "boolean"
},
"isDefaultAddress": {
"type": "boolean"
},
"longitude": {
"type": "Number"
},
"latitude": {
"type": "Number"
},
"isEqualizated": {
"type": "boolean"
}
},
"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": "$everyone",
"permission": "DENY"
},
{
"accessType": "*",
"principalType": "ROLE",
"principalId": "root",
"permission": "ALLOW"
}
]
}