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": {
|
2021-09-02 09:56:59 +00:00
|
|
|
"type": "number",
|
2020-02-21 11:39:41 +00:00
|
|
|
"id": true,
|
|
|
|
"description": "Identifier"
|
|
|
|
},
|
|
|
|
"name": {
|
|
|
|
"type": "string",
|
|
|
|
"required": true
|
|
|
|
}
|
2017-10-13 14:22:45 +00:00
|
|
|
},
|
2020-02-21 11:39:41 +00:00
|
|
|
"relations": {
|
|
|
|
"country": {
|
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "Country",
|
|
|
|
"foreignKey": "countryFk"
|
|
|
|
},
|
2021-09-02 09:56:59 +00:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
]
|
2017-10-13 14:22:45 +00:00
|
|
|
}
|