refs #5318 eliminido triggers y añadido loggable en salix
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Vicent Llopis 2023-04-12 10:02:06 +02:00
parent 736d0375f6
commit 58750aa065
6 changed files with 78 additions and 7 deletions

View File

@ -0,0 +1,5 @@
DROP TRIGGER `vn`.`deviceProduction_afterInsert`;
DROP TRIGGER `vn`.`deviceProduction_afterUpdate`;
DROP TRIGGER `vn`.`deviceProductionUser_afterDelete`;

View File

@ -23,6 +23,9 @@
"DeviceProduction": {
"dataSource": "vn"
},
"DeviceProductionLog": {
"dataSource": "vn"
},
"DeviceProductionModels": {
"dataSource": "vn"
},

View File

@ -0,0 +1,55 @@
{
"name": "DeviceProductionLog",
"base": "VnModel",
"options": {
"mysql": {
"table": "deviceProductionLog"
}
},
"properties": {
"id": {
"id": true,
"type": "number",
"forceId": false
},
"originFk": {
"type": "number",
"required": true
},
"userFk": {
"type": "number"
},
"deviceProduction": {
"type": "number"
},
"action": {
"type": "string",
"required": true
},
"created": {
"type": "date"
},
"oldInstance": {
"type": "object"
},
"newInstance": {
"type": "object"
},
"changedModel": {
"type": "string"
},
"changedModelId": {
"type": "number"
}
},
"relations": {
"user": {
"type": "belongsTo",
"model": "Account",
"foreignKey": "userFk"
}
},
"scope": {
"order": ["created DESC", "id DESC"]
}
}

View File

@ -1,6 +1,10 @@
{
"name": "DeviceProductionUser",
"base": "VnModel",
"base": "Loggable",
"log": {
"model": "DeviceProductionLog",
"relation": "deviceProduction"
},
"options": {
"mysql": {
"table": "deviceProductionUser"

View File

@ -1,6 +1,9 @@
{
"name": "DeviceProduction",
"base": "VnModel",
"base": "Loggable",
"log": {
"model": "DeviceProductionLog"
},
"options": {
"mysql": {
"table": "deviceProduction"

View File

@ -31,11 +31,12 @@
value-field="id"
show-field="serialNumber">
<tpl-item>
<span>ID: {{id}}</span>
<span class="separator"></span>
<span>{{'Model' | translate}}: {{modelFk}}</span>
<span class="separator"></span>
<span>{{'Serial Number' | translate}}: {{serialNumber}}</span>
<div>
ID: {{id}}
</div>
<div class="text-caption text-secondary">
{{modelFk}}, {{serialNumber}}
</div>
</tpl-item>
</vn-autocomplete>
</vn-horizontal>