89 lines
1.7 KiB
JSON
89 lines
1.7 KiB
JSON
{
|
|
"name": "Item",
|
|
"base": "VnModel",
|
|
"options": {
|
|
"mysql": {
|
|
"table": "item"
|
|
}
|
|
},
|
|
"properties": {
|
|
"id": {
|
|
"type": "Number",
|
|
"id": true,
|
|
"description": "Identifier"
|
|
},
|
|
"name": {
|
|
"type": "String",
|
|
"required": true
|
|
},
|
|
"size": {
|
|
"type": "Number"
|
|
},
|
|
"category": {
|
|
"type": "String"
|
|
},
|
|
"stems": {
|
|
"type": "Number"
|
|
},
|
|
"description": {
|
|
"type": "String"
|
|
},
|
|
"isOnOffer": {
|
|
"type": "Boolean"
|
|
},
|
|
"isBargain": {
|
|
"type": "Boolean"
|
|
},
|
|
"comment": {
|
|
"type": "String"
|
|
},
|
|
"relevancy": {
|
|
"type": "Number"
|
|
},
|
|
"image": {
|
|
"type": "String"
|
|
}
|
|
},
|
|
"relations": {
|
|
"itemType": {
|
|
"type": "belongsTo",
|
|
"model": "ItemType",
|
|
"foreignKey": "typeFk"
|
|
},
|
|
"ink": {
|
|
"type": "belongsTo",
|
|
"model": "Ink",
|
|
"foreignKey": "inkFk"
|
|
},
|
|
"origin": {
|
|
"type": "belongsTo",
|
|
"model": "Origin",
|
|
"foreignKey": "originFk"
|
|
},
|
|
"producer": {
|
|
"type": "belongsTo",
|
|
"model": "Producer",
|
|
"foreignKey": "producerFk"
|
|
},
|
|
"intrastat": {
|
|
"type": "belongsTo",
|
|
"model": "Intrastat",
|
|
"foreignKey": "intrastatFk"
|
|
},
|
|
"expence": {
|
|
"type": "belongsTo",
|
|
"model": "Expence",
|
|
"foreignKey": "expenceFk"
|
|
},
|
|
"itemTag": {
|
|
"type": "hasMany",
|
|
"model": "ItemTag",
|
|
"foreignKey": "itemFk"
|
|
},
|
|
"itemBarcode": {
|
|
"type": "hasMany",
|
|
"model": "ItemBarcode",
|
|
"foreignKey": "itemFk"
|
|
}
|
|
}
|
|
} |