salix/back/models/province.json

62 lines
1.3 KiB
JSON
Raw Permalink Normal View History

2017-10-13 14:22:45 +00:00
{
2020-02-21 11:39:41 +00:00
"name": "Province",
"description": "Provinces of every country",
"base": "VnModel",
"options": {
"mysql": {
"table": "province"
}
2017-10-13 14:22:45 +00:00
},
2020-02-21 11:39:41 +00:00
"properties": {
"id": {
"type": "number",
2020-02-21 11:39:41 +00:00
"id": true,
"description": "Identifier"
},
"name": {
"type": "string",
"required": true
},
"autonomyFk": {
"type": "number"
2020-02-21 11:39:41 +00:00
}
2017-10-13 14:22:45 +00:00
},
2020-02-21 11:39:41 +00:00
"relations": {
"country": {
"type": "belongsTo",
"model": "Country",
"foreignKey": "countryFk"
},
"autonomy": {
"type": "belongsTo",
"model": "Autonomy",
"foreignKey": "autonomyFk"
},
2020-02-21 11:39:41 +00:00
"warehouse": {
"type": "belongsTo",
"model": "Warehouse",
"foreignKey": "warehouseFk"
},
"zone": {
"type": "belongsTo",
"model": "Zone",
"foreignKey": "zoneFk"
}
2017-10-13 14:22:45 +00:00
},
2020-02-21 11:39:41 +00:00
"scopes": {
"location": {
"include": {
"relation": "country"
}
}
},
"acls": [
{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
}
]
}