62 lines
1.3 KiB
JSON
62 lines
1.3 KiB
JSON
{
|
|
"name": "Province",
|
|
"description": "Provinces of every country",
|
|
"base": "VnModel",
|
|
"options": {
|
|
"mysql": {
|
|
"table": "province"
|
|
}
|
|
},
|
|
"properties": {
|
|
"id": {
|
|
"type": "number",
|
|
"id": true,
|
|
"description": "Identifier"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
"autonomyFk": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"relations": {
|
|
"country": {
|
|
"type": "belongsTo",
|
|
"model": "Country",
|
|
"foreignKey": "countryFk"
|
|
},
|
|
"autonomy": {
|
|
"type": "belongsTo",
|
|
"model": "Autonomy",
|
|
"foreignKey": "autonomyFk"
|
|
},
|
|
"warehouse": {
|
|
"type": "belongsTo",
|
|
"model": "Warehouse",
|
|
"foreignKey": "warehouseFk"
|
|
},
|
|
"zone": {
|
|
"type": "belongsTo",
|
|
"model": "Zone",
|
|
"foreignKey": "zoneFk"
|
|
}
|
|
},
|
|
"scopes": {
|
|
"location": {
|
|
"include": {
|
|
"relation": "country"
|
|
}
|
|
}
|
|
},
|
|
"acls": [
|
|
{
|
|
"accessType": "READ",
|
|
"principalType": "ROLE",
|
|
"principalId": "$everyone",
|
|
"permission": "ALLOW"
|
|
}
|
|
]
|
|
}
|