add new models and update structure db

This commit is contained in:
Bernat 2018-09-25 08:47:11 +02:00
parent cba9c2ca47
commit 7afa99f25d
9 changed files with 164 additions and 11 deletions

View File

@ -0,0 +1,22 @@
{
"name": "TpvError",
"base": "VnModel",
"options": {
"mysql": {
"table": "tpvError",
"database": "hedera"
}
},
"properties": {
"code": {
"type": "String",
"id": true,
"description": "Identifier"
},
"message": {
"type": "string",
"required": true
}
}
}

View File

@ -0,0 +1,33 @@
{
"name": "TpvMerchant",
"base": "VnModel",
"options": {
"mysql": {
"table": "tpvMerchant",
"database": "hedera"
}
},
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"description": {
"type": "string",
"required": true
},
"secretKey": {
"type": "string",
"required": true
}
},
"relations": {
"company": {
"type": "belongsTo",
"model": "Company",
"foreignKey": "companyFk"
}
}
}

View File

@ -0,0 +1,22 @@
{
"name": "TpvResponse",
"base": "VnModel",
"options": {
"mysql": {
"table": "tpvResponse",
"database": "hedera"
}
},
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"message": {
"type": "string",
"required": true
}
}
}

View File

@ -43,5 +43,14 @@
}, },
"ClientSample": { "ClientSample": {
"dataSource": "vn" "dataSource": "vn"
},
"TpvError": {
"dataSource": "hedera"
},
"TpvMerchant": {
"dataSource": "hedera"
},
"TpvResponse": {
"dataSource": "hedera"
} }
} }

View File

@ -11,6 +11,8 @@ 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 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 echo USE `cache`; >> install/dump/03-dumpedFixtures.sql
mysqldump --defaults-file=connect.ini --no-create-info cache cache >> install/dump/03-dumpedFixtures.sql mysqldump --defaults-file=connect.ini --no-create-info cache cache >> install/dump/03-dumpedFixtures.sql
echo USE `hedera`; >> install/dump/03-dumpedFixtures.sql
mysqldump --defaults-file=connect.ini --no-create-info hedera tpvError tpvResponse >> install/dump/03-dumpedFixtures.sql

View File

@ -12,3 +12,5 @@ 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 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 echo "USE \`cache\`;" >> install/dump/03-dumpedFixtures.sql
mysqldump --defaults-file=connect.ini --no-create-info cache cache >> install/dump/03-dumpedFixtures.sql mysqldump --defaults-file=connect.ini --no-create-info cache cache >> install/dump/03-dumpedFixtures.sql
echo "USE \`hedera\`;" >> install/dump/03-dumpedFixtures.sql
mysqldump --defaults-file=connect.ini --no-create-info hedera tpvError tpvResponse >> install/dump/03-dumpedFixtures.sql

View File

@ -0,0 +1,10 @@
USE `vn`;
CREATE
OR REPLACE ALGORITHM = UNDEFINED
DEFINER = `root`@`%`
SQL SECURITY DEFINER
VIEW `vn`.`orderTicket` AS
SELECT
`b`.`order_id` AS `orderFk`, `b`.`Id_Ticket` AS `ticketFk`
FROM
`vn2008`.`order_Tickets` `b`;

File diff suppressed because one or more lines are too long

View File

@ -870,3 +870,8 @@ INSERT INTO `vn`.`claimEnd`(`id`, `saleFk`, `claimFk`, `workerFk`, `claimDestina
( 2, 2, 1, 9, 5), ( 2, 2, 1, 9, 5),
( 3, 5, 2, 9, 5), ( 3, 5, 2, 9, 5),
( 4, 6, 3, 9, 5); ( 4, 6, 3, 9, 5);
INSERT INTO `hedera`.`tpvMerchant`(`id`, `description`, `companyFk`, `bankFk`, `secretKey`)
VALUES
( 1, 'Arkham Bank', 442, 1, 'h12387193H10238'),
( 2, 'NewYork Bank', 442, 1, '7981ugsgd1hsdad');