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

56 lines
965 B
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",
"required": true
},
"price": {
"type": "Number",
"required": true
},
"bonus": {
"type": "Number",
"required": true
},
"isVolumetric": {
"type": "Boolean",
"required": true
}
},
"relations": {
"geolocations": {
"type": "hasMany",
"model": "ZoneGeo",
"foreignKey": "zoneFk"
},
"warehouse": {
"type": "belongsTo",
"model": "Warehouse",
"foreignKey": "warehouseFk"
},
"agencyMode": {
"type": "belongsTo",
"model": "AgencyMode",
"foreignKey": "agencyModeFk"
}
}
}