Merge pull request 'feat: refs #7216 logUnpaid' (!2609) from 7216-clientUnpaid into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #2609
Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
This commit is contained in:
Javi Gallego 2024-06-20 05:50:14 +00:00
commit 018972b948
6 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,8 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`clientUnpaid_beforeInsert`
BEFORE INSERT ON `clientUnpaid`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
END$$
DELIMITER ;

View File

@ -0,0 +1,8 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`clientUnpaid_beforeUpdate`
BEFORE UPDATE ON `clientUnpaid`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
END$$
DELIMITER ;

View File

@ -0,0 +1,4 @@
ALTER TABLE vn.clientUnpaid
ADD editorFk INT UNSIGNED NULL,
ADD CONSTRAINT ClientUnpaid_editorFk FOREIGN KEY (editorFk)
REFERENCES account.`user`(id);

View File

@ -0,0 +1,5 @@
name: unpaid
columns:
clientFk: client
dated: date
amount: amount

View File

@ -0,0 +1,5 @@
name: impagado
columns:
clientFk: cliente
dated: fecha
amount: cantidad

View File

@ -1,6 +1,9 @@
{
"name": "ClientUnpaid",
"base": "VnModel",
"mixins": {
"Loggable": true
},
"options": {
"mysql": {
"table": "clientUnpaid"