88 lines
2.0 KiB
JSON
88 lines
2.0 KiB
JSON
{
|
|
"name": "Claim",
|
|
"base": "VnModel",
|
|
"mixins": {
|
|
"Loggable": true
|
|
},
|
|
"options": {
|
|
"mysql": {
|
|
"table": "claim"
|
|
}
|
|
},
|
|
"properties": {
|
|
"id": {
|
|
"type": "number",
|
|
"id": true,
|
|
"description": "Identifier"
|
|
},
|
|
"observation": {
|
|
"type": "string"
|
|
},
|
|
"ticketCreated": {
|
|
"type": "date",
|
|
"required": true
|
|
},
|
|
"isChargedToMana": {
|
|
"type": "boolean"
|
|
},
|
|
"created": {
|
|
"type": "date"
|
|
},
|
|
"responsibility": {
|
|
"type": "number"
|
|
},
|
|
"pickup": {
|
|
"type": "string",
|
|
"mysql": {
|
|
"columnName": "pickup",
|
|
"dataType": "ENUM('agency', 'delivery')",
|
|
"default": "null"
|
|
}
|
|
},
|
|
"ticketFk": {
|
|
"type": "number"
|
|
},
|
|
"claimStateFk": {
|
|
"type": "number"
|
|
},
|
|
"workerFk": {
|
|
"type": "number"
|
|
},
|
|
"packages": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"relations": {
|
|
"claimState": {
|
|
"type": "belongsTo",
|
|
"model": "ClaimState",
|
|
"foreignKey": "claimStateFk"
|
|
},
|
|
"client": {
|
|
"type": "belongsTo",
|
|
"model": "Client",
|
|
"foreignKey": "clientFk"
|
|
},
|
|
"worker": {
|
|
"type": "belongsTo",
|
|
"model": "Worker",
|
|
"foreignKey": "workerFk"
|
|
},
|
|
"ticket": {
|
|
"type": "belongsTo",
|
|
"model": "Ticket",
|
|
"foreignKey": "ticketFk"
|
|
},
|
|
"claimDms": {
|
|
"type": "hasMany",
|
|
"model": "ClaimDms",
|
|
"foreignKey": "claimFk"
|
|
},
|
|
"lines": {
|
|
"type": "hasMany",
|
|
"model": "ClaimBeginning",
|
|
"foreignKey": "claimFk"
|
|
}
|
|
}
|
|
}
|