new model ticketWeekly with fixtures
This commit is contained in:
parent
33f7b2d45a
commit
7732dfc5ec
|
@ -0,0 +1,10 @@
|
|||
USE `vn`;
|
||||
CREATE
|
||||
OR REPLACE ALGORITHM = UNDEFINED
|
||||
DEFINER = `root`@`%`
|
||||
SQL SECURITY DEFINER
|
||||
VIEW `ticketWeekly` AS
|
||||
SELECT
|
||||
`t`.`Id_Ticket` AS `ticketFk`, `t`.`weekDay` AS `weekDay`
|
||||
FROM
|
||||
`vn2008`.`Tickets_turno` `t`;
|
|
@ -586,4 +586,17 @@ INSERT INTO `cache`.`cache_calc`(`id`, `cache_id`, `cacheName`, `params`, `last_
|
|||
INSERT INTO `bs`.`workerMana`(`workerFk`, `amount`)
|
||||
VALUES
|
||||
( 1, -500),
|
||||
( 3, 0),
|
||||
( 5, 250),
|
||||
( 6, 1000),
|
||||
( 9, 1500);
|
||||
|
||||
|
||||
INSERT INTO `vn`.`ticketWeekly`(`ticketFk`, `weekDay`)
|
||||
VALUES
|
||||
( 1, 0),
|
||||
( 2, 1),
|
||||
( 3, 2),
|
||||
( 4, 4),
|
||||
( 5, 6);
|
||||
|
|
@ -8,11 +8,11 @@
|
|||
},
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "String"
|
||||
"type": "Number"
|
||||
},
|
||||
"workerFk": {
|
||||
"id": true,
|
||||
"type": "String"
|
||||
"type": "Number"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"name": "TicketWeekly",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "ticketWeekly"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"weekDay": {
|
||||
"type": "Number"
|
||||
},
|
||||
"ticketFk": {
|
||||
"id": true,
|
||||
"type": "Number"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"ticket": {
|
||||
"type": "belongsTo",
|
||||
"model": "Ticket",
|
||||
"foreignKey": "ticketFk"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -34,6 +34,9 @@
|
|||
},
|
||||
"TicketUpdateAction": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"TicketWeekly": {
|
||||
"dataSource": "vn"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue