{ "name": "Item", "base": "Loggable", "options": { "mysql": { "table": "item" } }, "properties": { "id": { "type": "number", "id": true, "description": "Id" }, "name": { "type": "string", "description": "Name" }, "size": { "type": "number", "description": "Size" }, "category": { "type": "string", "description": "Category" }, "typeFk": { "type": "number", "description": "Type", "required": true }, "stems": { "type": "number", "description": "Stems" }, "description": { "type": "string", "description": "Description" }, "isActive": { "type": "boolean", "description": "Active" }, "comment": { "type": "string", "description": "Comment" }, "relevancy": { "type": "number", "description": "Relevancy" }, "weightByPiece": { "type": "number", "description": "WeightByPiece" }, "stemMultiplier": { "type": "number", "description": "Multiplier" }, "image": { "type": "string", "description": "Image" }, "longName": { "type": "string", "description": "Long name" }, "subName": { "type": "string", "description": "Subname" }, "tag5": { "type": "string" }, "value5": { "type": "string" }, "tag6": { "type": "string" }, "value6": { "type": "string" }, "tag7": { "type": "string" }, "value7": { "type": "string" }, "tag8": { "type": "string" }, "value8": { "type": "string" }, "tag9": { "type": "string" }, "value9": { "type": "string" }, "tag10": { "type": "string" }, "value10": { "type": "string" }, "itemPackingTypeFk": { "type": "string" }, "hasKgPrice": { "type": "boolean", "description": "Price per Kg" }, "family": { "type": "string", "description": "The item family" }, "expenseFk": { "type": "number", "mysql": { "columnName": "expenceFk" } }, "minPrice": { "type": "number" }, "packingOut": { "type": "number" }, "hasMinPrice": { "type": "boolean" }, "isFragile": { "type": "boolean" }, "isFloramondo": { "type": "boolean" }, "packingShelve": { "type": "number" }, "isLaid": { "type": "boolean" }, "isPhotoRequested": { "type": "boolean", "mysql":{ "columnName": "doPhoto" } } }, "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" }, "expense": { "type": "belongsTo", "model": "Expense", "foreignKey": "expenseFk" }, "generic": { "type": "belongsTo", "model": "Item", "foreignKey": "genericFk" }, "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" } }, "scopes": { "withName": { "where": { "name": { "neq": "" } } } } }