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

72 lines
1.2 KiB
JSON

{
"name": "Zone",
"base": "Loggable",
"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"
},
"itemMaxSize": {
"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"
}
}
}