new model ticketWeekly with fixtures

This commit is contained in:
Bernat 2018-05-03 13:24:35 +02:00
parent 33f7b2d45a
commit 7732dfc5ec
5 changed files with 53 additions and 2 deletions

View File

@ -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`;

View File

@ -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);

View File

@ -8,11 +8,11 @@
},
"properties": {
"amount": {
"type": "String"
"type": "Number"
},
"workerFk": {
"id": true,
"type": "String"
"type": "Number"
}
},
"relations": {

View File

@ -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"
}
}
}

View File

@ -34,6 +34,9 @@
},
"TicketUpdateAction": {
"dataSource": "vn"
},
"TicketWeekly": {
"dataSource": "vn"
}
}