2018-03-06 07:55:54 +00:00
|
|
|
{
|
2019-01-31 13:14:39 +00:00
|
|
|
"name": "CreditInsurance",
|
|
|
|
"description": "Credit insurance",
|
|
|
|
"base": "VnModel",
|
|
|
|
"options": {
|
|
|
|
"mysql": {
|
|
|
|
"table": "creditInsurance"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"properties": {
|
|
|
|
"id": {
|
2018-03-06 07:55:54 +00:00
|
|
|
"id": true,
|
|
|
|
"type": "Number",
|
|
|
|
"description": "Identifier"
|
|
|
|
},
|
|
|
|
"credit": {
|
|
|
|
"type": "Number"
|
|
|
|
},
|
2018-03-06 12:11:22 +00:00
|
|
|
"created": {
|
|
|
|
"type": "date",
|
2019-01-31 13:14:39 +00:00
|
|
|
"mysql": {
|
|
|
|
"columnName": "creationDate"
|
|
|
|
}
|
2018-03-06 07:55:54 +00:00
|
|
|
},
|
|
|
|
"grade": {
|
|
|
|
"type": "Number"
|
|
|
|
}
|
|
|
|
},
|
2018-03-06 12:11:22 +00:00
|
|
|
"relations": {
|
2018-03-14 10:36:57 +00:00
|
|
|
"classification": {
|
2018-03-06 07:55:54 +00:00
|
|
|
"type": "belongsTo",
|
|
|
|
"model": "CreditClassification",
|
2019-01-31 13:14:39 +00:00
|
|
|
"foreignKey": "creditClassification"
|
2018-03-06 07:55:54 +00:00
|
|
|
}
|
2020-01-23 12:31:07 +00:00
|
|
|
},
|
|
|
|
"scope": {
|
|
|
|
"include": {
|
|
|
|
"relation": "classification",
|
|
|
|
"scope": {
|
|
|
|
"fields": ["client"],
|
|
|
|
"include": {
|
|
|
|
"relation": "customer",
|
|
|
|
"scope": {
|
|
|
|
"fields": ["name", "salesPersonFk"],
|
|
|
|
"include": {
|
|
|
|
"relation": "salesPerson",
|
|
|
|
"scope": {
|
|
|
|
"fields": "userFk",
|
|
|
|
"include": {
|
|
|
|
"relation": "user",
|
|
|
|
"scope": {
|
|
|
|
"fields": ["name"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-03-06 07:55:54 +00:00
|
|
|
}
|
|
|
|
}
|