tablas dms
This commit is contained in:
parent
47e55580ad
commit
a920bc1d8f
|
@ -37,6 +37,12 @@
|
|||
},
|
||||
"EmailUser": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Dms": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"DmsType": {
|
||||
"dataSource": "vn"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"name": "Dms",
|
||||
"description": "Documental Managment system",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "dms"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "Number",
|
||||
"id": true,
|
||||
"description": "Identifier"
|
||||
},
|
||||
"file": {
|
||||
"type": "string"
|
||||
},
|
||||
"reference": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"created": {
|
||||
"type": "Date"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"dmsType": {
|
||||
"type": "belongsTo",
|
||||
"model": "DmsType",
|
||||
"foreignKey": "dmsTypeFk"
|
||||
},
|
||||
"worker": {
|
||||
"type": "belongsTo",
|
||||
"model": "Worker",
|
||||
"foreignKey": "workerFk"
|
||||
},
|
||||
"warehouse": {
|
||||
"type": "belongsTo",
|
||||
"model": "Warehouse",
|
||||
"foreignKey": "warehouseFk"
|
||||
},
|
||||
"company": {
|
||||
"type": "belongsTo",
|
||||
"model": "Company",
|
||||
"foreignKey": "companyFk"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"name": "DmsType",
|
||||
"description": "Documental Managment system types",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "dmsType"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "Number",
|
||||
"id": true,
|
||||
"description": "Identifier"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"path": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
{
|
||||
"accessType": "READ",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "$everyone",
|
||||
"permission": "ALLOW"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
USE `vn`;
|
||||
CREATE
|
||||
OR REPLACE ALGORITHM = UNDEFINED
|
||||
DEFINER = `root`@`%`
|
||||
SQL SECURITY DEFINER
|
||||
VIEW `vn`.`dms` AS
|
||||
SELECT
|
||||
`g`.`id` AS `id`,
|
||||
`g`.`gesttip_id` AS `dmsTypeFk`,
|
||||
`g`.`file` AS `file`,
|
||||
`g`.`trabajador_id` AS `workerFk`,
|
||||
`g`.`warehouse_id` AS `warehouseFk`,
|
||||
`g`.`emp_id` AS `companyFk`,
|
||||
`g`.`orden` AS `priority`,
|
||||
`g`.`file` AS `hasFile`,
|
||||
`g`.`sref` AS `reference`,
|
||||
`g`.`brief` AS `description`,
|
||||
`g`.`odbc_date` AS `created`
|
||||
FROM
|
||||
`vn2008`.`gestdoc` `g`
|
|
@ -0,0 +1,11 @@
|
|||
DROP VIEW IF EXISTS `vn`.`dmsTicket` ;
|
||||
USE `vn`;
|
||||
CREATE
|
||||
OR REPLACE ALGORITHM = UNDEFINED
|
||||
DEFINER = `root`@`%`
|
||||
SQL SECURITY DEFINER
|
||||
VIEW `vn`.`ticketDms` AS
|
||||
SELECT
|
||||
`g`.`Id_Ticket` AS `ticketFk`, `g`.`gestdoc_id` AS `dmsFk`
|
||||
FROM
|
||||
`vn2008`.`tickets_gestdoc` `g`;
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE `vn2008`.`gesttip`
|
||||
ADD COLUMN `writeRoleFk` INT(10) UNSIGNED NULL AFTER `path`,
|
||||
ADD COLUMN `ReadRoleFk` INT(10) UNSIGNED NULL AFTER `writeRoleFk`;
|
|
@ -38,6 +38,9 @@
|
|||
"Ticket": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"TicketDms": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"TicketLog": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"name": "TicketDms",
|
||||
"base": "Loggable",
|
||||
"log": {
|
||||
"model": "TicketLog",
|
||||
"relation": "ticket",
|
||||
"showField": "dmsFk"
|
||||
},
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "ticketDms"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"ticketFk": {
|
||||
"type": "Number",
|
||||
"id": true,
|
||||
"required": true
|
||||
},
|
||||
"dmsFk": {
|
||||
"type": "Number",
|
||||
"id": true,
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"ticket": {
|
||||
"type": "belongsTo",
|
||||
"model": "Ticket",
|
||||
"foreignKey": "ticketFk"
|
||||
},
|
||||
"dms": {
|
||||
"type": "belongsTo",
|
||||
"model": "Dms",
|
||||
"foreignKey": "dmsFk"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue