Merge pull request 'feat: refs #6818 define prefix model' (!3254) from 6818-hotfix-definePrefix into master
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #3254
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Jorge Penadés 2024-11-28 08:50:01 +00:00
commit eb97f6ef5f
3 changed files with 31 additions and 1 deletions

View File

@ -133,6 +133,9 @@
"Postcode": {
"dataSource": "vn"
},
"Prefix": {
"dataSource": "vn"
},
"ReferenceRate": {
"dataSource": "vn"
},

27
back/models/prefix.json Normal file
View File

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

View File

@ -54,7 +54,7 @@ module.exports = Self => {
{
relation: 'country',
scope: {
fields: ['id', 'name'],
fields: ['id', 'name', 'code'],
include: {
relation: 'saySimpleCountry',
}