8144-devToTest_2448 #3216
|
@ -139,6 +139,9 @@
|
|||
"StarredModule": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"SaySimpleCountry": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"TempContainer": {
|
||||
"dataSource": "tempStorage"
|
||||
},
|
||||
|
|
|
@ -44,6 +44,11 @@
|
|||
"type": "belongsTo",
|
||||
"model": "Continent",
|
||||
"foreignKey": "continentFk"
|
||||
},
|
||||
"saySimpleCountry": {
|
||||
"type": "hasOne",
|
||||
"model": "SaySimpleCountry",
|
||||
"foreignKey": "countryFk"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -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);
|
|
@ -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
|
||||
);
|
|
@ -54,7 +54,10 @@ module.exports = Self => {
|
|||
{
|
||||
relation: 'country',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
fields: ['id', 'name'],
|
||||
include: {
|
||||
relation: 'saySimpleCountry',
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue