new model itemTypeTag

This commit is contained in:
Bernat 2018-05-17 14:28:15 +02:00
parent 983e66d7ee
commit 665d819c34
3 changed files with 43 additions and 0 deletions

View File

@ -568,6 +568,14 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
(19, 4, 4, 'Manhattan', 2),
(20, 4, 5, 'Tony Stark', 1);
INSERT INTO `vn`.`itemTypeTag`(`id`, `itemTypeFk`, `tagFk`, `priority`)
VALUES
( 1, 1, 1, 0),
( 2, 2, 2, 0),
( 3, 3, 3, 1),
( 4, 1, 4, 1),
( 5, 1, 5, 1);
INSERT INTO `vn`.`itemLog` (`id`, `originFk`, `userFk`, `action`, `description`)
VALUES
('1', '1', '1', 'insert', 'We made a change!');

View File

@ -0,0 +1,32 @@
{
"name": "ItemTypeTag",
"base": "VnModel",
"options": {
"mysql": {
"table": "itemTypeTag",
"database": "vn"
}
},
"properties": {
"id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"priority": {
"type": "Number"
}
},
"relations": {
"type": {
"type": "belongsTo",
"model": "ItemType",
"foreignKey": "itemTypeFk"
},
"tag": {
"type": "belongsTo",
"model": "Tag",
"foreignKey": "tagFk"
}
}
}

View File

@ -34,5 +34,8 @@
},
"Genus": {
"dataSource": "edi"
},
"ItemTypeTag": {
"dataSource": "vn"
}
}