refs #5925 models table docuware #1889

Merged
carlossa merged 5 commits from 5925-docuwareTablet into dev 2023-12-21 13:20:04 +00:00
4 changed files with 58 additions and 1 deletions
Showing only changes of commit 412cac7e94 - Show all commits

View File

@ -103,6 +103,11 @@ module.exports = Self => {
'FieldName': 'FILTRO_TABLET', 'FieldName': 'FILTRO_TABLET',
'ItemElementName': 'string', 'ItemElementName': 'string',
'Item': 'Tablet1', 'Item': 'Tablet1',
},
{
'FieldName': 'ID_TABLET',
'ItemElementName': 'integer',
'Item': userConfig.tabletFk,
} }
] ]
}; };

View File

@ -0,0 +1,20 @@
{
"name": "docuwareTablet",
"base": "VnModel",
"options": {
"mysql": {
"table": "vn.docuwareTablet"
}
},
"properties": {
"id": {
"type": "number"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
}
}
}

View File

@ -26,6 +26,9 @@
}, },
"darkMode": { "darkMode": {
"type": "boolean" "type": "boolean"
},
"tabletFk": {
"type": "number"
} }
}, },
"relations": { "relations": {
@ -43,6 +46,11 @@
"type": "belongsTo", "type": "belongsTo",
"model": "VnUser", "model": "VnUser",
"foreignKey": "userFk" "foreignKey": "userFk"
} },
"Tablet": {
"type": "belongsTo",
"model": "docuwareTablet",
"foreignKey": "tabletFk"
}
} }
} }

View File

@ -0,0 +1,24 @@
-- vn.docuwareTablet definition
CREATE TABLE `vn`.`docuwareTablet` (
`id` int(3) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`description` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
-- Auto-generated SQL script. Actual values for binary/complex data types may differ - what you see is the default string representation of values.
INSERT INTO `vn`.`docuwareTablet` (`id`,`name`,`description`)
VALUES (1,'tabletRRHH','tablet de recursos humanos');
INSERT INTO `vn`.`docuwareTablet` (`id`,`name`,`description`)
VALUES (2,'tabletIT','tablet de IT');
INSERT INTO `vn`.`docuwareTablet` (`id`,`name`,`description`)
VALUES (3,'tabletCompradores','tablet de compradores');
INSERT INTO `vn`.`docuwareTablet` (`id`,`name`,`description`)
VALUES (4,'tabletComerciales','tablet de comerciales');
INSERT INTO `vn`.`docuwareTablet` (`id`,`name`,`description`)
VALUES (5,'tabletAdministracion','tablet de administracion');
ALTER TABLE `vn`.`userConfig`
ADD COLUMN tabletFk int(3),
ADD FOREIGN KEY (tabletFk) REFERENCES `vn`.`docuwareTablet`(id);