2024-07-22 09:52:42 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn-admin`@`localhost`
|
2024-01-15 11:31:03 +00:00
|
|
|
SQL SECURITY DEFINER
|
|
|
|
VIEW `vn`.`workerTimeControlUserInfo`
|
|
|
|
AS SELECT `u`.`id` AS `userFk`,
|
|
|
|
`w`.`firstName` AS `name`,
|
|
|
|
`w`.`lastName` AS `surname`,
|
|
|
|
`u`.`name` AS `user`,
|
|
|
|
`u`.`password` AS `password`,
|
|
|
|
`wd`.`departmentFk` AS `departmentFk`,
|
|
|
|
left(`c`.`fi`, 8) AS `dni`
|
|
|
|
FROM (
|
|
|
|
(
|
|
|
|
(
|
|
|
|
`account`.`user` `u`
|
|
|
|
JOIN `vn`.`worker` `w` ON(`w`.`id` = `u`.`id`)
|
|
|
|
)
|
|
|
|
JOIN `vn`.`client` `c` ON(`c`.`id` = `u`.`id`)
|
|
|
|
)
|
|
|
|
LEFT JOIN `vn`.`workerDepartment` `wd` ON(`wd`.`workerFk` = `w`.`id`)
|
|
|
|
)
|