Merge pull request 'feat: refs #6818 saysimple integration' (!3168) from 6818-saySimpleIntegration into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #3168 Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
commit
968e308ab6
|
@ -139,6 +139,12 @@
|
|||
"StarredModule": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"SaySimpleCountry": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"SaySimpleConfig": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"TempContainer": {
|
||||
"dataSource": "tempStorage"
|
||||
},
|
||||
|
|
|
@ -44,6 +44,11 @@
|
|||
"type": "belongsTo",
|
||||
"model": "Continent",
|
||||
"foreignKey": "continentFk"
|
||||
},
|
||||
"saySimpleCountry": {
|
||||
"type": "hasOne",
|
||||
"model": "SaySimpleCountry",
|
||||
"foreignKey": "countryFk"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
|
@ -54,4 +59,4 @@
|
|||
"permission": "ALLOW"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "SaySimpleConfig",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "saySimpleConfig"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"id": true
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
{
|
||||
"accessType": "READ",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "$authenticated",
|
||||
"permission": "ALLOW"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -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": "$authenticated",
|
||||
"permission": "ALLOW"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -4022,3 +4022,10 @@ INSERT INTO srt.buffer (id, x, y, `size`, `length`, stateFk, typeFk, isActive, c
|
|||
(10, 0, 2000, 500, 13000, 1, 1, 1, '05A', 5, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL);
|
||||
|
||||
|
||||
INSERT IGNORE INTO vn.saySimpleCountry (countryFk, channel)
|
||||
VALUES (19, 1169),
|
||||
(8, 1183),
|
||||
(NULL, 1320);
|
||||
|
||||
INSERT IGNORE INTO vn.saySimpleConfig (url)
|
||||
VALUES ('saysimle-url-mock');
|
|
@ -0,0 +1,16 @@
|
|||
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
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS vn.saySimpleConfig(
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
url VARCHAR(255) NOT NULL
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO vn.saySimpleCountry (countryFk, channel)
|
||||
VALUES (19, 1169),
|
||||
(8, 1183),
|
||||
(NULL, 1320);
|
|
@ -54,7 +54,10 @@ module.exports = Self => {
|
|||
{
|
||||
relation: 'country',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
fields: ['id', 'name'],
|
||||
include: {
|
||||
relation: 'saySimpleCountry',
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue