8144-devToTest_2448 #3216

Merged
alexm merged 256 commits from 8144-devToTest_2448 into test 2024-11-19 07:36:04 +00:00
6 changed files with 48 additions and 2 deletions
Showing only changes of commit 6927f4b28d - Show all commits

View File

@ -139,6 +139,9 @@
"StarredModule": {
"dataSource": "vn"
},
"SaySimpleCountry": {
"dataSource": "vn"
},
"TempContainer": {
"dataSource": "tempStorage"
},

View File

@ -44,6 +44,11 @@
"type": "belongsTo",
"model": "Continent",
"foreignKey": "continentFk"
},
"saySimpleCountry": {
"type": "hasOne",
"model": "SaySimpleCountry",
"foreignKey": "countryFk"
}
},
"acls": [
@ -54,4 +59,4 @@
"permission": "ALLOW"
}
]
}
}

View File

@ -0,0 +1,26 @@
{
"name": "SaySimpleCountry",
"base": "VnModel",
"options": {
"mysql": {
"table": "saySimpleCountry"
}
},
"properties": {
"countryFk": {
"type": "number",
"id": true
},
"channel": {
"type": "number"
}
},
"acls": [
{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
}
]
}

View File

@ -4008,3 +4008,6 @@ UPDATE vn.department SET pbxQueue = '1000' WHERE name = "CAMARA";
UPDATE vn.department SET pbxQueue = '2000' WHERE name = "VENTAS";
INSERT INTO vn.saySimpleCountry (countryFk, channel)
VALUES (19, 1169),
(8, 1183);

View File

@ -0,0 +1,6 @@
CREATE TABLE IF NOT EXISTS vn.saySimpleCountry(
countryFk MEDIUMINT(8) UNSIGNED,
channel INT(4) COMMENT 'channel de whatsapp de saySimple',
PRIMARY KEY (countryFk),
CONSTRAINT `saySimpleCountry_FK` FOREIGN KEY (`countryFk`) REFERENCES vn.country (`id`) ON UPDATE CASCADE
);

View File

@ -54,7 +54,10 @@ module.exports = Self => {
{
relation: 'country',
scope: {
fields: ['name']
fields: ['id', 'name'],
include: {
relation: 'saySimpleCountry',
}
}
},
{