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

52 lines
861 B
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": {
"country": {
"type": "belongsTo",
"model": "Country",
"foreignKey": "id"
},
"client": {
"type": "hasOne",
"model": "Client",
"foreignKey": "id"
}
}
}