diff --git a/services/db/install/dump/fixtures.sql b/services/db/install/dump/fixtures.sql index a0eb01fa2..b8a887667 100644 --- a/services/db/install/dump/fixtures.sql +++ b/services/db/install/dump/fixtures.sql @@ -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!'); diff --git a/services/item/common/models/itemTypeTag.json b/services/item/common/models/itemTypeTag.json new file mode 100644 index 000000000..581c58079 --- /dev/null +++ b/services/item/common/models/itemTypeTag.json @@ -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" + } + } +} \ No newline at end of file diff --git a/services/item/server/model-config.json b/services/item/server/model-config.json index e3d4fe9ad..9954710f4 100644 --- a/services/item/server/model-config.json +++ b/services/item/server/model-config.json @@ -34,5 +34,8 @@ }, "Genus": { "dataSource": "edi" + }, + "ItemTypeTag": { + "dataSource": "vn" } }