refs #5925 models table docuware #1889
|
@ -103,6 +103,11 @@ module.exports = Self => {
|
|||
'FieldName': 'FILTRO_TABLET',
|
||||
'ItemElementName': 'string',
|
||||
'Item': 'Tablet1',
|
||||
},
|
||||
{
|
||||
'FieldName': 'ID_TABLET',
|
||||
'ItemElementName': 'integer',
|
||||
'Item': userConfig.tabletFk,
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "docuwareTablet",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "vn.docuwareTablet"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -26,6 +26,9 @@
|
|||
},
|
||||
"darkMode": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"tabletFk": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
|
@ -43,6 +46,11 @@
|
|||
"type": "belongsTo",
|
||||
"model": "VnUser",
|
||||
"foreignKey": "userFk"
|
||||
}
|
||||
},
|
||||
"Tablet": {
|
||||
"type": "belongsTo",
|
||||
"model": "docuwareTablet",
|
||||
"foreignKey": "tabletFk"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
Loading…
Reference in New Issue