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

88 lines
1.9 KiB
JSON

{
"name": "Claim",
"base": "Loggable",
"log": {
"model": "ClaimLog",
"showField": "id"
},
"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"
}
}
}