create new model morwerTeam

This commit is contained in:
Bernat 2018-10-30 09:43:17 +01:00
parent d220e9b9cd
commit 82f58c8bc0
4 changed files with 46 additions and 2 deletions

View File

@ -0,0 +1 @@
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES (118, 'WorkerTeam', '*', '*', 'ALLOW', 'role', 'salesPerson');

View File

@ -1009,3 +1009,12 @@ INSERT INTO `vn`.`receipt`(`id`, `invoiceFk`, `amountPaid`, `amountUnpaid`, `pay
(2, 'Cobro web', 200.50, 0.00, CURDATE(), 9, 1, 101, CURDATE(), 442, 1),
(3, 'Cobro en efectivo', 300.00, 100.00, CURDATE(), 9, 1, 102, CURDATE(), 442, 0),
(4, 'Cobro en efectivo', 400.00, -50.00, CURDATE(), 9, 1, 103, CURDATE(), 442, 0);
INSERT INTO `vn2008`.`workerTeam`(`id`, `team`, `user`)
VALUES
(1, 1, 9),
(2, 1, 18),
(3, 2, 101),
(4, 2, 102),
(5, 3, 103),
(6, 3, 104);

View File

@ -0,0 +1,31 @@
{
"name": "WorkerTeam",
"base": "VnModel",
"options": {
"mysql": {
"table": "workerTeam"
}
},
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"team": {
"type": "Number"
}
},
"relations": {
"user": {
"type": "belongsTo",
"model": "Account",
"foreignKey": "userFk"
},
"worker": {
"type": "belongsTo",
"model": "Worker",
"foreignKey": "Id_Trabajador"
}
}
}

View File

@ -140,5 +140,8 @@
},
"ClaimRatio": {
"dataSource": "vn"
},
"WorkerTeam": {
"dataSource": "vn"
}
}