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,
|
2022-05-12 07:47:47 +00:00
|
|
|
"type": "number",
|
2018-03-06 07:55:54 +00:00
|
|
|
"description": "Identifier"
|
|
|
|
},
|
|
|
|
"credit": {
|
2022-05-12 07:47:47 +00:00
|
|
|
"type": "number"
|
2018-03-06 07:55:54 +00:00
|
|
|
},
|
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": {
|
2022-05-12 07:47:47 +00:00
|
|
|
"type": "number"
|
2018-03-06 07:55:54 +00:00
|
|
|
}
|
|
|
|
},
|
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": {
|
2020-09-15 17:43:07 +00:00
|
|
|
"relation": "salesPersonUser",
|
2020-01-23 12:31:07 +00:00
|
|
|
"scope": {
|
2020-09-15 17:43:07 +00:00
|
|
|
"fields": ["id", "name"]
|
2020-01-23 12:31:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-03-06 07:55:54 +00:00
|
|
|
}
|
|
|
|
}
|