119 lines
2.7 KiB
JSON
119 lines
2.7 KiB
JSON
{
|
|
"name": "Vehicle",
|
|
"base": "VnModel",
|
|
"options": {
|
|
"mysql": {
|
|
"table": "vehicle"
|
|
}
|
|
},
|
|
"properties": {
|
|
"id": {
|
|
"type": "number",
|
|
"id": true,
|
|
"description": "Identifier"
|
|
},
|
|
"numberPlate": {
|
|
"type": "string"
|
|
},
|
|
"tradeMark": {
|
|
"type": "string"
|
|
},
|
|
"model": {
|
|
"type": "string"
|
|
},
|
|
"m3": {
|
|
"type": "number"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"isActive": {
|
|
"type": "number"
|
|
},
|
|
"countryCodeFk": {
|
|
"type": "string"
|
|
},
|
|
"chassis": {
|
|
"type": "string"
|
|
},
|
|
"leasing": {
|
|
"type": "string"
|
|
},
|
|
"isKmTruckRate": {
|
|
"type": "number"
|
|
},
|
|
"fuelTypeFk": {
|
|
"type": "number"
|
|
},
|
|
"import": {
|
|
"type": "number"
|
|
},
|
|
"vin": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"relations": {
|
|
"company": {
|
|
"type": "belongsTo",
|
|
"model": "Company",
|
|
"foreignKey": "companyFk"
|
|
},
|
|
"warehouse": {
|
|
"type": "belongsTo",
|
|
"model": "Warehouse",
|
|
"foreignKey": "warehouseFk"
|
|
},
|
|
"deliveryPoint": {
|
|
"type": "belongsTo",
|
|
"model": "DeliveryPoint",
|
|
"foreignKey": "deliveryPointFk"
|
|
},
|
|
"event": {
|
|
"type": "hasMany",
|
|
"model": "VehicleEvent",
|
|
"foreignKey": "vehicleFk",
|
|
"property": "id"
|
|
},
|
|
"supplier": {
|
|
"type": "belongsTo",
|
|
"model": "Supplier",
|
|
"foreignKey": "supplierFk"
|
|
},
|
|
"supplierCooler": {
|
|
"type": "belongsTo",
|
|
"model": "Supplier",
|
|
"foreignKey": "supplierCoolerFk"
|
|
},
|
|
"bankPolicy": {
|
|
"type": "belongsTo",
|
|
"model": "BankPolicy",
|
|
"foreignKey": "bankPolicyFk"
|
|
},
|
|
"fuelType": {
|
|
"type": "belongsTo",
|
|
"model": "FuelType",
|
|
"foreignKey": "fuelTypeFk"
|
|
},
|
|
"ppe": {
|
|
"type": "hasOne",
|
|
"model": "Ppe",
|
|
"foreignKey": "id",
|
|
"property": "ppeFk"
|
|
}
|
|
},
|
|
"scope": {
|
|
"where": {
|
|
"isActive": {
|
|
"neq": false
|
|
}
|
|
}
|
|
},
|
|
"acls": [
|
|
{
|
|
"accessType": "READ",
|
|
"principalType": "ROLE",
|
|
"principalId": "$everyone",
|
|
"permission": "ALLOW"
|
|
}
|
|
]
|
|
} |