2017-12-19 11:29:35 +00:00
|
|
|
{
|
|
|
|
"name": "Item",
|
2023-12-05 06:48:56 +00:00
|
|
|
"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": {
|
2018-07-24 05:34:14 +00:00
|
|
|
"id": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "number",
|
2018-07-24 05:34:14 +00:00
|
|
|
"id": true,
|
2019-10-28 16:31:33 +00:00
|
|
|
"description": "Id"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
|
|
|
"name": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "string",
|
2019-10-28 16:31:33 +00:00
|
|
|
"description": "Name"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
|
|
|
"size": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "number",
|
2019-10-28 16:31:33 +00:00
|
|
|
"description": "Size"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
|
|
|
"category": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "string",
|
2019-10-28 16:31:33 +00:00
|
|
|
"description": "Category"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
2019-01-16 07:46:40 +00:00
|
|
|
"typeFk": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "number",
|
2019-10-28 16:31:33 +00:00
|
|
|
"description": "Type",
|
2019-01-16 07:46:40 +00:00
|
|
|
"required": true
|
|
|
|
},
|
2018-07-24 05:34:14 +00:00
|
|
|
"stems": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "number",
|
2019-10-28 16:31:33 +00:00
|
|
|
"description": "Stems"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
|
|
|
"description": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "string",
|
2019-10-28 16:31:33 +00:00
|
|
|
"description": "Description"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
2018-10-16 11:18:24 +00:00
|
|
|
"isActive": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "boolean",
|
2019-10-28 16:31:33 +00:00
|
|
|
"description": "Active"
|
2018-10-16 11:18:24 +00:00
|
|
|
},
|
2018-07-24 05:34:14 +00:00
|
|
|
"comment": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "string",
|
2019-10-28 16:31:33 +00:00
|
|
|
"description": "Comment"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
|
|
|
"relevancy": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "number",
|
2019-10-28 16:31:33 +00:00
|
|
|
"description": "Relevancy"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
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": {
|
2021-01-18 16:17:02 +00:00
|
|
|
"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",
|
2019-10-28 16:31:33 +00:00
|
|
|
"description": "Image"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
|
|
|
"longName": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "string",
|
2019-10-28 16:31:33 +00:00
|
|
|
"description": "Long name"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
|
|
|
"subName": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "string",
|
2019-10-28 16:31:33 +00:00
|
|
|
"description": "Subname"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
|
|
|
"tag5": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "string"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
|
|
|
"value5": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "string"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
|
|
|
"tag6": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "string"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
|
|
|
"value6": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "string"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
|
|
|
"tag7": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "string"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
|
|
|
"value7": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "string"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
|
|
|
"tag8": {
|
2021-01-18 13:17:01 +00:00
|
|
|
"type": "string"
|
2018-07-24 05:34:14 +00:00
|
|
|
},
|
|
|
|
"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",
|
2019-10-28 16:31:33 +00:00
|
|
|
"description": "Price per Kg"
|
2019-12-13 10:59:25 +00:00
|
|
|
},
|
2021-05-19 12:15:28 +00:00
|
|
|
"family": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "The item family"
|
|
|
|
},
|
2019-12-13 10:59:25 +00:00
|
|
|
"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"
|
|
|
|
},
|
2021-06-15 10:47:40 +00:00
|
|
|
"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"
|
2021-11-15 12:53:18 +00:00
|
|
|
},
|
|
|
|
"isFloramondo": {
|
|
|
|
"type": "boolean"
|
2022-04-27 12:17:41 +00:00
|
|
|
},
|
2022-11-04 06:42:21 +00:00
|
|
|
"isLaid": {
|
|
|
|
"type": "boolean"
|
2023-01-17 09:11:41 +00:00
|
|
|
},
|
|
|
|
"isPhotoRequested": {
|
|
|
|
"type": "boolean",
|
2024-01-31 07:52:36 +00:00
|
|
|
"mysql": {
|
2023-01-17 09:11:41 +00:00
|
|
|
"columnName": "doPhoto"
|
|
|
|
}
|
2023-10-13 09:56:50 +00:00
|
|
|
},
|
|
|
|
"minQuantity": {
|
|
|
|
"type": "number",
|
|
|
|
"description": "Min quantity"
|
2024-04-26 13:48:30 +00:00
|
|
|
},
|
|
|
|
"photoMotivation":{
|
|
|
|
"type": "string"
|
2018-07-24 05:34:14 +00:00
|
|
|
}
|
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"
|
|
|
|
},
|
2021-11-26 07:34:32 +00:00
|
|
|
"generic": {
|
2021-11-24 07:51:07 +00:00
|
|
|
"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"
|
|
|
|
},
|
2021-05-19 12:15:28 +00:00
|
|
|
"packaging": {
|
|
|
|
"type": "hasOne",
|
|
|
|
"model": "Packaging",
|
|
|
|
"foreignKey": "itemFk"
|
2020-02-17 06:22:55 +00:00
|
|
|
}
|
2020-03-11 14:56:02 +00:00
|
|
|
},
|
2021-08-30 09:23:46 +00:00
|
|
|
"scopes": {
|
|
|
|
"withName": {
|
|
|
|
"where": {
|
|
|
|
"name": {
|
|
|
|
"neq": ""
|
|
|
|
}
|
2020-03-11 14:56:02 +00:00
|
|
|
}
|
|
|
|
}
|
2017-12-19 11:29:35 +00:00
|
|
|
}
|
2024-01-31 07:52:36 +00:00
|
|
|
}
|