8093-devToTest_2442_3 #3100

Merged
alexm merged 284 commits from 8093-devToTest_2442_3 into test 2024-10-15 06:51:43 +00:00
6 changed files with 121 additions and 3 deletions
Showing only changes of commit 6ff76fd74b - Show all commits

View File

@ -175,6 +175,12 @@
"PrintConfig": { "PrintConfig": {
"dataSource": "vn" "dataSource": "vn"
}, },
"QueueMember": {
"dataSource": "vn"
},
"Queue": {
"dataSource": "vn"
},
"ViaexpressConfig": { "ViaexpressConfig": {
"dataSource": "vn" "dataSource": "vn"
}, },

View File

@ -0,0 +1,38 @@
{
"name": "QueueMember",
"base": "VnModel",
"options": {
"mysql": {
"table": "pbx.queueMember"
}
},
"properties": {
"id": {
"type": "number",
"id": true
},
"queue": {
"type": "string"
},
"extension": {
"type": "string"
}
},
"relations": {
"queueRelation": {
"type": "belongsTo",
"model": "Queue",
"foreignKey": "queue",
"primaryKey": "name"
}
},
"acls": [
{
"property": "*",
"accessType": "READ",
"principalType": "ROLE",
"principalId": "employee",
"permission": "ALLOW"
}
]
}

30
back/models/queue.json Normal file
View File

@ -0,0 +1,30 @@
{
"name": "Queue",
"base": "VnModel",
"options": {
"mysql": {
"table": "pbx.queue"
}
},
"properties": {
"id": {
"type": "number",
"id": true
},
"description": {
"type": "string"
},
"name": {
"type": "string"
}
},
"acls": [
{
"property": "*",
"accessType": "READ",
"principalType": "ROLE",
"principalId": "employee",
"permission": "ALLOW"
}
]
}

View File

@ -3972,3 +3972,22 @@ INSERT INTO vn.accountDetailType (id, description, code)
INSERT IGNORE INTO ormConfig INSERT IGNORE INTO ormConfig
SET id =1, SET id =1,
selectLimit = 1000; selectLimit = 1000;
INSERT INTO pbx.queueMultiConfig
SET id = 'ring',
strategy = 20,
timeout = 2,
retry = 0,
weight = 0,
maxLen = 0,
ringInUse = 0;
INSERT IGNORE INTO pbx.queue
SET description = 'X-men',
name = '1000',
config = 1;
INSERT IGNORE INTO pbx.queueMember
SET queue = '1000',
extension = '1010';

View File

@ -25,7 +25,12 @@
"type": "belongsTo", "type": "belongsTo",
"model": "VnUser", "model": "VnUser",
"foreignKey": "user_id" "foreignKey": "user_id"
},
"queueMember": {
"type": "belongsTo",
"model": "QueueMember",
"foreignKey": "extension",
"primaryKey": "extension"
} }
} }
} }

View File

@ -253,7 +253,27 @@
"relation": "client" "relation": "client"
}, },
{ {
"relation": "sip" "relation": "sip",
"scope": {
"include": {
"relation": "queueMember",
"scope": {
"fields": [
"queue",
"extension"
],
"include": {
"relation": "queueRelation",
"scope": {
"fields": [
"description",
"name"
]
}
}
}
}
}
} }
] ]
}, },