feat: refs #7216 logUnpaid #2609

Merged
jgallego merged 2 commits from 7216-clientUnpaid into dev 2024-06-20 05:50:15 +00:00
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:
Review

la columna editorFk, no hay que añadirla?

la columna editorFk, no hay que añadirla?
clientFk: client
dated: date
amount: amount

View File

@ -0,0 +1,5 @@
name: impagado
Review

la columna editorFk, no hay que añadirla?

la columna editorFk, no hay que añadirla?
columns:
clientFk: cliente
dated: fecha
amount: cantidad

View File

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