Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
This commit is contained in:
commit
cb85610c5d
|
@ -43,5 +43,11 @@
|
|||
},
|
||||
"PersonMedia": {
|
||||
"dataSource": "vn"
|
||||
}
|
||||
}
|
||||
},
|
||||
"PersonDepartment": {
|
||||
"dataSource": "vn"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"name": "PersonDepartment",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "personDepartment"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "String"
|
||||
},
|
||||
"firstName": {
|
||||
"type": "String"
|
||||
},
|
||||
"workerFk": {
|
||||
"id": true,
|
||||
"type": "Number"
|
||||
},
|
||||
"department": {
|
||||
"type": "Number"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"worker": {
|
||||
"type": "belongsTo",
|
||||
"model": "Worker",
|
||||
"foreignKey": "workerFk"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@ CREATE
|
|||
SQL SECURITY DEFINER
|
||||
VIEW `vn`.`personDepartment` AS
|
||||
SELECT
|
||||
`p`.`id_trabajador` AS `id_trabajador`,
|
||||
`p`.`id_trabajador` AS `workerFk`,
|
||||
`p`.`name` AS `name`,
|
||||
`p`.`firstname` AS `firstname`,
|
||||
`d`.`name` AS `department`
|
||||
|
|
Loading…
Reference in New Issue