diff --git a/back/model-config.json b/back/model-config.json index efb148ee8..364ffabdf 100644 --- a/back/model-config.json +++ b/back/model-config.json @@ -142,6 +142,9 @@ "SaySimpleCountry": { "dataSource": "vn" }, + "SaySimpleConfig": { + "dataSource": "vn" + }, "TempContainer": { "dataSource": "tempStorage" }, diff --git a/back/models/say-simple-config.json b/back/models/say-simple-config.json new file mode 100644 index 000000000..edc4caa43 --- /dev/null +++ b/back/models/say-simple-config.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/back/models/say-simple-country.json b/back/models/say-simple-country.json index 39acd5f0b..adddddc02 100644 --- a/back/models/say-simple-country.json +++ b/back/models/say-simple-country.json @@ -19,7 +19,7 @@ { "accessType": "READ", "principalType": "ROLE", - "principalId": "$everyone", + "principalId": "$authenticated", "permission": "ALLOW" } ] diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index ce4e9ddfc..cd2fb8b6b 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -4010,4 +4010,8 @@ UPDATE vn.department SET pbxQueue = '2000' WHERE name = "VENTAS"; INSERT IGNORE INTO vn.saySimpleCountry (countryFk, channel) VALUES (19, 1169), - (8, 1183); \ No newline at end of file + (8, 1183), + (NULL, 1320); + +INSERT IGNORE INTO vn.saySimpleConfig (url) + VALUES ('saysimle-url-mock'); \ No newline at end of file diff --git a/db/versions/11330-greenMoss/00-firstScript.sql b/db/versions/11330-greenMoss/00-firstScript.sql index 762e456b1..127c8e40e 100644 --- a/db/versions/11330-greenMoss/00-firstScript.sql +++ b/db/versions/11330-greenMoss/00-firstScript.sql @@ -5,6 +5,12 @@ CREATE TABLE IF NOT EXISTS vn.saySimpleCountry( 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); \ No newline at end of file + (8, 1183), + (NULL, 1320); \ No newline at end of file