new models: genus, item-botanical, specie

This commit is contained in:
Daniel Herrero 2018-02-15 10:58:02 +01:00
parent 81b374d744
commit a3cfb155e0
6 changed files with 148 additions and 0 deletions

View File

@ -0,0 +1,28 @@
{
"name": "Genus",
"base": "VnModel",
"options": {
"mysql": {
"table": "genus"
}
},
"properties": {
"genus_id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"latin_genus_name": {
"type": "String"
},
"entry_date": {
"type": "date"
},
"expiry_date": {
"type": "date"
},
"change_date_time": {
"type": "date"
}
}
}

View File

@ -0,0 +1,36 @@
{
"name": "ItemBotanical",
"base": "VnModel",
"options": {
"mysql": {
"table": "itemBotanical"
}
},
"properties": {
"itemFk": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"botanical": {
"type": "String"
}
},
"relations": {
"item": {
"type": "belongsTo",
"model": "Item",
"foreignKey": "itemFk"
},
"genus": {
"type": "belongsTo",
"model": "Genus",
"foreignKey": "genusFk"
},
"specie": {
"type": "belongsTo",
"model": "Specie",
"foreignKey": "specieFk"
}
}
}

View File

@ -0,0 +1,26 @@
{
"name": "ItemPlacement",
"base": "VnModel",
"options": {
"mysql": {
"table": "itemPlacement"
}
},
"properties": {
"code": {
"type": "String"
}
},
"relations": {
"item": {
"type": "belongsTo",
"model": "Item",
"foreignKey": "itemFk"
},
"warehouse": {
"type": "belongsTo",
"model": "Warehouse",
"foreignKey": "warehouseFk"
}
}
}

View File

@ -0,0 +1,35 @@
{
"name": "Specie",
"base": "VnModel",
"options": {
"mysql": {
"table": "specie"
}
},
"properties": {
"specie_id": {
"type": "Number",
"id": true,
"description": "Identifier"
},
"latin_species_name": {
"type": "String"
},
"entry_date": {
"type": "date"
},
"expiry_date": {
"type": "date"
},
"change_date_time": {
"type": "date"
}
},
"relations": {
"genus": {
"type": "belongsTo",
"model": "Genus",
"foreignKey": "genus_id"
}
}
}

View File

@ -40,5 +40,17 @@
},
"ItemBarcode": {
"dataSource": "vn"
},
"ItemBotanical": {
"dataSource": "vn"
},
"ItemPlacement": {
"dataSource": "vn"
},
"Specie": {
"dataSource": "edi"
},
"Genus": {
"dataSource": "edi"
}
}

View File

@ -34,5 +34,16 @@
"password": "",
"connectTimeout": 20000,
"acquireTimeout": 20000
},
"edi": {
"connector": "mysql",
"database": "edi",
"debug": false,
"host": "localhost",
"port": 3306,
"username": "root",
"password": "",
"connectTimeout": 20000,
"acquireTimeout": 20000
}
}