add new models and fixtures

This commit is contained in:
Bernat 2018-07-25 20:47:07 +02:00
parent 2433d7684d
commit 4e2ff17121
8 changed files with 106 additions and 11 deletions

View File

@ -0,0 +1,33 @@
{
"name": "ClientNotificationType",
"base": "VnModel",
"options": {
"mysql": {
"table": "clientNotificationType"
}
},
"properties": {
"id": {
"id": true,
"type": "Number",
"description": "Identifier"
},
"code": {
"type": "String"
},
"description": {
"type": "String"
},
"isVisible": {
"type": "Number"
}
},
"acls": [
{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
}
]
}

View File

@ -0,0 +1,36 @@
{
"name": "ClientNotification",
"base": "VnModel",
"options": {
"mysql": {
"table": "clientNotification"
}
},
"properties": {
"id": {
"id": true,
"type": "Number",
"description": "Identifier"
},
"created": {
"type": "date"
}
},
"relations": {
"client": {
"type": "belongsTo",
"model": "Client",
"foreignKey": "clientFk"
},
"clientNotificationType": {
"type": "belongsTo",
"model": "ClientNotificationType",
"foreignKey": "clientNotificationTypeFk"
},
"worker": {
"type": "belongsTo",
"model": "Worker",
"foreignKey": "workerFk"
}
}
}

View File

@ -37,5 +37,11 @@
},
"CreditClassification": {
"dataSource": "vn"
},
"ClientNotificationType": {
"dataSource": "vn"
},
"ClientNotification": {
"dataSource": "vn"
}
}

View File

@ -6,7 +6,7 @@ mysqldump --defaults-file=connect.ini --no-create-info salix ACL >> install/dump
echo USE `vn`; >> install/dump/03-dumpedFixtures.sql
mysqldump --defaults-file=connect.ini --no-create-info vn cplusInvoiceType477 cplusSubjectOp cplusTaxBreak bookingPlanner pgc >> install/dump/03-dumpedFixtures.sql
echo USE `vn2008`; >> install/dump/03-dumpedFixtures.sql
mysqldump --defaults-file=connect.ini --no-create-info vn2008 accion_dits Gastos Tintas tarifa_componentes tarifa_componentes_series state bionic_updating_options Grupos Monedas container iva_group_codigo >> install/dump/03-dumpedFixtures.sql
mysqldump --defaults-file=connect.ini --no-create-info vn2008 accion_dits Gastos Tintas tarifa_componentes tarifa_componentes_series state bionic_updating_options Grupos Monedas container iva_group_codigo escritos >> install/dump/03-dumpedFixtures.sql
echo USE `bi`; >> install/dump/03-dumpedFixtures.sql
mysqldump --defaults-file=connect.ini --no-create-info bi tarifa_componentes tarifa_componentes_series >> install/dump/03-dumpedFixtures.sql
echo USE `cache`; >> install/dump/03-dumpedFixtures.sql

View File

@ -7,7 +7,7 @@ mysqldump --defaults-file=connect.ini --no-create-info salix ACL >> install/dump
echo "USE \`vn\`;" >> install/dump/03-dumpedFixtures.sql
mysqldump --defaults-file=connect.ini --no-create-info vn cplusInvoiceType477 cplusSubjectOp cplusTaxBreak bookingPlanner pgc >> install/dump/03-dumpedFixtures.sql
echo "USE \`vn2008\`;" >> install/dump/03-dumpedFixtures.sql
mysqldump --defaults-file=connect.ini --no-create-info vn2008 accion_dits Gastos Tintas tarifa_componentes tarifa_componentes_series state bionic_updating_options Grupos Monedas container iva_group_codigo >> install/dump/03-dumpedFixtures.sql
mysqldump --defaults-file=connect.ini --no-create-info vn2008 accion_dits Gastos Tintas tarifa_componentes tarifa_componentes_series state bionic_updating_options Grupos Monedas container iva_group_codigo escritos >> install/dump/03-dumpedFixtures.sql
echo "USE \`bi\`;" >> install/dump/03-dumpedFixtures.sql
mysqldump --defaults-file=connect.ini --no-create-info bi tarifa_componentes tarifa_componentes_series >> install/dump/03-dumpedFixtures.sql
echo "USE \`cache\`;" >> install/dump/03-dumpedFixtures.sql

View File

@ -0,0 +1 @@
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES (95, 'ClientNotification', '*', '*', 'ALLOW', 'ROLE', 'employee');

File diff suppressed because one or more lines are too long

View File

@ -726,4 +726,13 @@ INSERT INTO `vn`.`clientContact`(`id`, `clientFk`, `name`, `phone`)
La otra manera es poner el calculo con los 2 trabajadores que utilizamos ahora mismo para los tickets
*/
call vn.manaSpellersRequery(19);
call vn.manaSpellersRequery(18);
call vn.manaSpellersRequery(18);
INSERT INTO `vn`.`clientNotification`(`id`, `clientFk`, `clientNotificationTypeFk`, `created`, `workerFk`)
VALUES
( 1, 101, 1, CURDATE(), 18),
( 2, 101, 1, CURDATE(), 18),
( 3, 101, 2, CURDATE(), 18),
( 4, 102, 2, CURDATE(), 18),
( 5, 102, 3, CURDATE(), 19);