added businesType model and relation to client

This commit is contained in:
Carlos Jimenez Ruiz 2021-06-29 10:51:01 +02:00
parent c6504140af
commit f3193f0dc1
5 changed files with 28 additions and 1 deletions

View File

@ -0,0 +1,2 @@
INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalType, principalId)
VALUES ('BusinessType', '*', 'READ', 'ALLOW', 'ROLE', 'employee');

View File

@ -1 +0,0 @@
Delete me

View File

@ -8,6 +8,9 @@
"BankEntity": {
"dataSource": "vn"
},
"BusinessType": {
"dataSource": "vn"
},
"Client": {
"dataSource": "vn"
},

View File

@ -0,0 +1,18 @@
{
"name": "BusinessType",
"base": "VnModel",
"options": {
"mysql": {
"table": "businessType"
}
},
"properties": {
"code": {
"type": "string",
"id": true
},
"description": {
"type": "string"
}
}
}

View File

@ -168,6 +168,11 @@
"model": "ClientType",
"foreignKey": "clientTypeFk"
},
"businessType": {
"type": "belongsTo",
"model": "BusinessType",
"foreignKey": "businessTypeFk"
},
"addresses": {
"type": "hasMany",
"model": "Address",