{
    "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
        }
    },
    "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"
        }
    ]
}