create new model ticketRequest
This commit is contained in:
parent
12fc0941b7
commit
ddcd7baaf6
|
@ -1 +1,2 @@
|
|||
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES (118, 'WorkerTeam', '*', '*', 'ALLOW', 'role', 'salesPerson');
|
||||
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES (119, 'TicketRequest', '*', '*', 'ALLOW', 'role', 'salesPerson');
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
USE `vn`;
|
||||
CREATE
|
||||
OR REPLACE ALGORITHM = UNDEFINED
|
||||
DEFINER = `root`@`%`
|
||||
SQL SECURITY DEFINER
|
||||
VIEW `ticketRequest` AS
|
||||
SELECT
|
||||
`t`.`Id_ORDEN` AS `id`,
|
||||
`t`.`ORDEN` AS `description`,
|
||||
`t`.`CodVENDEDOR` AS `requestFk`,
|
||||
`t`.`CodCOMPRADOR` AS `atenderFk`,
|
||||
`t`.`CANTIDAD` AS `quantity`,
|
||||
`t`.`PRECIOMAX` AS `price`,
|
||||
`t`.`KO` AS `isOk`,
|
||||
`t`.`Id_Movimiento` AS `saleFk`,
|
||||
`t`.`odbc_date` AS `created`
|
||||
FROM
|
||||
`vn2008`.`Ordenes` `t`;
|
|
@ -1018,3 +1018,10 @@ INSERT INTO `vn2008`.`workerTeam`(`id`, `team`, `user`)
|
|||
(4, 2, 102),
|
||||
(5, 3, 103),
|
||||
(6, 3, 104);
|
||||
|
||||
INSERT INTO `vn`.`ticketRequest`(`id`, `description`, `requestFk`, `atenderFk`, `quantity`, `price`, `isOk`, `saleFk`, `created`)
|
||||
VALUES
|
||||
(1, 'Gem of Time', '018', '035', 5, 9.10, 0, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||
(2, 'Gem of Mind', '018', '035', 10, 1.07, 0, 2, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||
(3, 'Mark I', '018', '035', 20, 3.06, 0, 4, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||
(4, 'Gem of Mind', '018', '035', 15, 1.30, 0, 7, CURDATE());
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"name": "TicketRequest",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "ticketRequest"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "Number",
|
||||
"id": true,
|
||||
"description": "Identifier"
|
||||
},
|
||||
"description": {
|
||||
"type": "String"
|
||||
},
|
||||
"created": {
|
||||
"type": "Date"
|
||||
},
|
||||
"quantity": {
|
||||
"type": "Number"
|
||||
},
|
||||
"price": {
|
||||
"type": "Number"
|
||||
},
|
||||
"isOk": {
|
||||
"type": "Boolean"
|
||||
},
|
||||
"atender": {
|
||||
"type": "String",
|
||||
"columnName": "atenderFk"
|
||||
},
|
||||
"requester": {
|
||||
"type": "String",
|
||||
"columnName": "requesterFk"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"sale": {
|
||||
"type": "belongsTo",
|
||||
"model": "Sale",
|
||||
"foreignKey": "saleFk"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -143,5 +143,8 @@
|
|||
},
|
||||
"WorkerTeam": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"TicketRequest": {
|
||||
"dataSource": "vn"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue