{
	"name": "Postcode",
	"base": "VnModel",
	"options": {
		"mysql": {
			"table": "postCode"
		}
	},
	"properties": {
		"code": {
			"id": true,
			"type": "string",
            "required": true
		}
	},
	"relations": {
		"town": {
            "type": "belongsTo",
            "model": "Town",
            "foreignKey": "townFk"
		},
		"geo": {
            "type": "belongsTo",
            "model": "ZoneGeo",
            "foreignKey": "geoFk"
        }
	},
	"acls": [{
		"accessType": "READ",
		"principalType": "ROLE",
		"principalId": "$everyone",
		"permission": "ALLOW"
	}],
	"scopes": {
		"location": {
			"include": {
				"relation": "town",
				"scope": {
					"include": {
						"relation": "province",
						"scope": {
							"include": {
								"relation": "country"
							}
						}
					}
				}
			}
		}
	}
}