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

62 lines
1.1 KiB
JSON

{
"name": "Address",
"base": "PersistedModel",
"validateUpsert": true,
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"street": {
"type": "string",
"required": true
},
"consignee": {
"type": "string",
"required": true
},
"city": {
"type": "string",
"required": true
},
"postcode": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"phone": {
"type": "string"
},
"mobile": {
"type": "string"
},
"default": {
"type": "boolean"
},
"relations": {
"agency": {
"type": "belongsTo",
"model": "Agency",
"foreignKey": "agencyId"
},
"country":{
"type": "belongsTo",
"model": "Country",
"foreignKey": "countryId"
},
"province":{
"type": "belongsTo",
"model": "Province",
"foreignKey": "provinceId"
},
"client": {
"type": "belongsTo",
"model":"Client",
"foreignKey": "clientId"
}
}
}
}