salix/modules/zone/back/models/zone.json

68 lines
1.1 KiB
JSON

{
"name": "Zone",
"base": "VnModel",
"options": {
"mysql": {
"table": "zone"
}
},
"properties": {
"id": {
"id": true,
"type": "Number"
},
"name": {
"type": "String",
"required": true
},
"hour": {
"type": "date",
"required": true
},
"travelingDays": {
"type": "Number"
},
"price": {
"type": "Number"
},
"bonus": {
"type": "Number"
},
"isVolumetric": {
"type": "Boolean"
},
"inflation": {
"type": "Number"
},
"m3Max": {
"type": "Number"
}
},
"relations": {
"geolocations": {
"type": "hasMany",
"model": "ZoneGeo",
"foreignKey": "zoneFk"
},
"agencyMode": {
"type": "belongsTo",
"model": "AgencyMode",
"foreignKey": "agencyModeFk"
},
"events": {
"type": "hasMany",
"model": "ZoneEvent",
"foreignKey": "zoneFk"
},
"exclusions": {
"type": "hasMany",
"model": "ZoneExclusion",
"foreignKey": "zoneFk"
},
"warehouses": {
"type": "hasMany",
"model": "ZoneWarehouse",
"foreignKey": "zoneFk"
}
}
}