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

72 lines
1.2 KiB
JSON

{
"name": "Zone",
"base": "Loggable",
"log": {
"model":"ZoneLog",
"showField": "name"
},
"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": {
"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"
},
"closures": {
"type": "hasMany",
"model": "ZoneClosure",
"foreignKey": "zoneFk"
}
}
}