feat: refs #6818 add config table

This commit is contained in:
Jorge Penadés 2024-11-08 17:47:10 +01:00
parent 9b28cf9130
commit 6ef1f950d1
5 changed files with 42 additions and 3 deletions

View File

@ -142,6 +142,9 @@
"SaySimpleCountry": { "SaySimpleCountry": {
"dataSource": "vn" "dataSource": "vn"
}, },
"SaySimpleConfig": {
"dataSource": "vn"
},
"TempContainer": { "TempContainer": {
"dataSource": "tempStorage" "dataSource": "tempStorage"
}, },

View File

@ -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"
}
]
}

View File

@ -19,7 +19,7 @@
{ {
"accessType": "READ", "accessType": "READ",
"principalType": "ROLE", "principalType": "ROLE",
"principalId": "$everyone", "principalId": "$authenticated",
"permission": "ALLOW" "permission": "ALLOW"
} }
] ]

View File

@ -4010,4 +4010,8 @@ UPDATE vn.department SET pbxQueue = '2000' WHERE name = "VENTAS";
INSERT IGNORE INTO vn.saySimpleCountry (countryFk, channel) INSERT IGNORE INTO vn.saySimpleCountry (countryFk, channel)
VALUES (19, 1169), VALUES (19, 1169),
(8, 1183); (8, 1183),
(NULL, 1320);
INSERT IGNORE INTO vn.saySimpleConfig (url)
VALUES ('saysimle-url-mock');

View File

@ -5,6 +5,12 @@ CREATE TABLE IF NOT EXISTS vn.saySimpleCountry(
CONSTRAINT `saySimpleCountry_FK` FOREIGN KEY (`countryFk`) REFERENCES vn.country (`id`) ON UPDATE CASCADE 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) INSERT IGNORE INTO vn.saySimpleCountry (countryFk, channel)
VALUES (19, 1169), VALUES (19, 1169),
(8, 1183); (8, 1183),
(NULL, 1320);