189 lines
4.2 KiB
JSON
189 lines
4.2 KiB
JSON
{
|
|
"name": "Item",
|
|
"base": "Loggable",
|
|
"log": {
|
|
"model": "ItemLog",
|
|
"showField": "id"
|
|
},
|
|
"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"
|
|
},
|
|
"isOnOffer": {
|
|
"type": "Boolean",
|
|
"description": "Offer"
|
|
},
|
|
"isBargain": {
|
|
"type": "Boolean",
|
|
"description": "Bargain"
|
|
},
|
|
"isActive": {
|
|
"type": "Boolean",
|
|
"description": "Active"
|
|
},
|
|
"comment": {
|
|
"type": "String",
|
|
"description": "Comment"
|
|
},
|
|
"relevancy": {
|
|
"type": "Number",
|
|
"description": "Relevancy"
|
|
},
|
|
"density": {
|
|
"type": "Number",
|
|
"description": "Density"
|
|
},
|
|
"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"
|
|
},
|
|
"hasKgPrice": {
|
|
"type": "Boolean",
|
|
"description": "Price per Kg"
|
|
},
|
|
"expenseFk": {
|
|
"type": "Number",
|
|
"mysql": {
|
|
"columnName": "expenceFk"
|
|
}
|
|
},
|
|
"minPrice": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"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"
|
|
},
|
|
"tags": {
|
|
"type": "hasMany",
|
|
"model": "ItemTag",
|
|
"foreignKey": "itemFk"
|
|
},
|
|
"itemBarcode": {
|
|
"type": "hasMany",
|
|
"model": "ItemBarcode",
|
|
"foreignKey": "itemFk"
|
|
},
|
|
"taxes": {
|
|
"type": "hasMany",
|
|
"model": "ItemTaxCountry",
|
|
"foreignKey": "itemFk"
|
|
},
|
|
"itemNiche": {
|
|
"type": "hasMany",
|
|
"model": "ItemNiche",
|
|
"foreignKey": "itemFk"
|
|
}
|
|
},
|
|
"scope": {
|
|
"where": {
|
|
"name": {
|
|
"neq": ""
|
|
}
|
|
}
|
|
}
|
|
} |