salix/modules/item/back/models/item.json

230 lines
5.2 KiB
JSON
Raw Normal View History

2017-12-19 11:29:35 +00:00
{
"name": "Item",
"base": "VnModel",
"mixins": {
"Loggable": true
},
2017-12-19 11:29:35 +00:00
"options": {
"mysql": {
2020-02-17 06:22:55 +00:00
"table": "item"
2017-12-19 11:29:35 +00:00
}
},
"properties": {
"id": {
2021-01-18 13:17:01 +00:00
"type": "number",
"id": true,
"description": "Id"
},
"name": {
2021-01-18 13:17:01 +00:00
"type": "string",
"description": "Name"
},
"size": {
2021-01-18 13:17:01 +00:00
"type": "number",
"description": "Size"
},
"category": {
2021-01-18 13:17:01 +00:00
"type": "string",
"description": "Category"
},
2019-01-16 07:46:40 +00:00
"typeFk": {
2021-01-18 13:17:01 +00:00
"type": "number",
"description": "Type",
2019-01-16 07:46:40 +00:00
"required": true
},
"stems": {
2021-01-18 13:17:01 +00:00
"type": "number",
"description": "Stems"
},
"description": {
2021-01-18 13:17:01 +00:00
"type": "string",
"description": "Description"
},
2018-10-16 11:18:24 +00:00
"isActive": {
2021-01-18 13:17:01 +00:00
"type": "boolean",
"description": "Active"
2018-10-16 11:18:24 +00:00
},
"comment": {
2021-01-18 13:17:01 +00:00
"type": "string",
"description": "Comment"
},
"relevancy": {
2021-01-18 13:17:01 +00:00
"type": "number",
"description": "Relevancy"
},
2022-08-24 12:13:26 +00:00
"weightByPiece": {
2021-01-18 13:17:01 +00:00
"type": "number",
2022-08-24 12:13:26 +00:00
"description": "WeightByPiece"
2018-12-17 13:15:39 +00:00
},
2021-01-18 10:43:48 +00:00
"stemMultiplier": {
"type": "number",
2021-01-18 10:43:48 +00:00
"description": "Multiplier"
2021-02-03 11:43:30 +00:00
},
"image": {
2021-01-18 13:17:01 +00:00
"type": "string",
"description": "Image"
},
"longName": {
2021-01-18 13:17:01 +00:00
"type": "string",
"description": "Long name"
},
"subName": {
2021-01-18 13:17:01 +00:00
"type": "string",
"description": "Subname"
},
"tag5": {
2021-01-18 13:17:01 +00:00
"type": "string"
},
"value5": {
2021-01-18 13:17:01 +00:00
"type": "string"
},
"tag6": {
2021-01-18 13:17:01 +00:00
"type": "string"
},
"value6": {
2021-01-18 13:17:01 +00:00
"type": "string"
},
"tag7": {
2021-01-18 13:17:01 +00:00
"type": "string"
},
"value7": {
2021-01-18 13:17:01 +00:00
"type": "string"
},
"tag8": {
2021-01-18 13:17:01 +00:00
"type": "string"
},
"value8": {
2021-01-18 13:17:01 +00:00
"type": "string"
2018-11-06 09:49:38 +00:00
},
"tag9": {
2021-01-18 13:17:01 +00:00
"type": "string"
2018-11-06 09:49:38 +00:00
},
"value9": {
2021-01-18 13:17:01 +00:00
"type": "string"
2018-11-06 09:49:38 +00:00
},
"tag10": {
2021-01-18 13:17:01 +00:00
"type": "string"
2018-11-06 09:49:38 +00:00
},
"value10": {
2021-01-18 13:17:01 +00:00
"type": "string"
2019-09-12 10:27:19 +00:00
},
2021-06-16 15:06:11 +00:00
"itemPackingTypeFk": {
"type": "string"
},
2019-09-12 10:27:19 +00:00
"hasKgPrice": {
2021-01-18 13:17:01 +00:00
"type": "boolean",
"description": "Price per Kg"
},
"family": {
"type": "string",
"description": "The item family"
},
"expenseFk": {
2023-11-27 08:51:56 +00:00
"type": "number"
2020-08-27 15:54:43 +00:00
},
"minPrice": {
"type": "number"
2020-09-17 07:58:00 +00:00
},
2023-07-11 05:37:51 +00:00
"recycledPlastic": {
"type": "number"
},
"nonRecycledPlastic": {
"type": "number"
},
"packingOut": {
"type": "number"
},
2021-01-18 13:17:01 +00:00
"hasMinPrice": {
"type": "boolean"
},
2020-09-17 07:58:00 +00:00
"isFragile": {
2021-01-18 13:17:01 +00:00
"type": "boolean"
},
"isFloramondo": {
"type": "boolean"
2022-04-27 12:17:41 +00:00
},
"packingShelve": {
"type": "number"
},
"isLaid": {
"type": "boolean"
2023-01-17 09:11:41 +00:00
},
"isPhotoRequested": {
"type": "boolean",
"mysql":{
"columnName": "doPhoto"
}
2023-10-13 09:56:50 +00:00
},
"minQuantity": {
"type": "number",
"description": "Min quantity"
}
2017-12-19 13:58:14 +00:00
},
"relations": {
2020-02-17 06:22:55 +00:00
"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"
},
"expense": {
"type": "belongsTo",
"model": "Expense",
"foreignKey": "expenseFk"
},
"generic": {
"type": "belongsTo",
"model": "Item",
"foreignKey": "genericFk"
},
2020-02-17 06:22:55 +00:00
"tags": {
"type": "hasMany",
"model": "ItemTag",
"foreignKey": "itemFk"
},
"itemBarcode": {
"type": "hasMany",
"model": "ItemBarcode",
"foreignKey": "itemFk"
},
"taxes": {
"type": "hasMany",
"model": "ItemTaxCountry",
"foreignKey": "itemFk"
},
"packaging": {
"type": "hasOne",
"model": "Packaging",
"foreignKey": "itemFk"
2020-02-17 06:22:55 +00:00
}
2020-03-11 14:56:02 +00:00
},
"scopes": {
"withName": {
"where": {
"name": {
"neq": ""
}
2020-03-11 14:56:02 +00:00
}
}
2017-12-19 11:29:35 +00:00
}
2023-03-22 10:03:13 +00:00
}