70 lines
1.3 KiB
JSON
70 lines
1.3 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"
|
|
}
|
|
},
|
|
"relations": {
|
|
"geolocations": {
|
|
"type": "hasMany",
|
|
"model": "ZoneGeo",
|
|
"foreignKey": "zoneFk"
|
|
},
|
|
"agencyMode": {
|
|
"type": "belongsTo",
|
|
"model": "AgencyMode",
|
|
"foreignKey": "agencyModeFk"
|
|
},
|
|
"warehouse": {
|
|
"type": "belongsTo",
|
|
"model": "Warehouse",
|
|
"foreignKey": "warehouseFk"
|
|
},
|
|
"events": {
|
|
"type": "hasMany",
|
|
"model": "ZoneEvent",
|
|
"foreignKey": "zoneFk"
|
|
},
|
|
"exclusions": {
|
|
"type": "hasMany",
|
|
"model": "ZoneExclusion",
|
|
"foreignKey": "zoneFk"
|
|
},
|
|
"warehouses": {
|
|
"type": "hasMany",
|
|
"model": "ZoneWarehouse",
|
|
"foreignKey": "zoneFk"
|
|
}
|
|
}
|
|
} |