salix/modules/claim/back/models/claim.json

92 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"
},
"hasToPickUp": {
"type": "boolean"
},
"ticketFk": {
"type": "number"
},
"claimStateFk": {
"type": "number"
},
"workerFk": {
"type": "number"
},
"packages": {
"type": "number"
},
"rma": {
"type": "string"
}
},
"relations": {
"claimState": {
"type": "belongsTo",
"model": "ClaimState",
"foreignKey": "claimStateFk"
},
"rmas": {
"type": "hasMany",
"model": "ClaimRma",
"foreignKey": "code",
"primaryKey": "rma"
},
"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"
}
}
}