62 lines
1.1 KiB
JSON
62 lines
1.1 KiB
JSON
{
|
|
"name": "Sale",
|
|
"base": "VnModel",
|
|
"options": {
|
|
"mysql": {
|
|
"table": "sale"
|
|
}
|
|
},
|
|
"properties": {
|
|
"id": {
|
|
"id": true,
|
|
"type": "Number",
|
|
"description": "Identifier"
|
|
},
|
|
"concept": {
|
|
"type": "String"
|
|
},
|
|
"quantity": {
|
|
"type": "Number"
|
|
},
|
|
"price": {
|
|
"type": "Number"
|
|
},
|
|
"discount": {
|
|
"type": "Number"
|
|
},
|
|
"reserved": {
|
|
"type": "Number"
|
|
},
|
|
"isPicked": {
|
|
"type": "Number"
|
|
},
|
|
"created": {
|
|
"type": "date"
|
|
}
|
|
},
|
|
"relations": {
|
|
"item": {
|
|
"type": "belongsTo",
|
|
"model": "Item",
|
|
"foreignKey": "itemFk",
|
|
"required": true
|
|
},
|
|
"itemTag": {
|
|
"type": "hasMany",
|
|
"model": "ItemTag",
|
|
"foreignKey": "itemFk"
|
|
},
|
|
"ticket": {
|
|
"type": "belongsTo",
|
|
"model": "Ticket",
|
|
"foreignKey": "ticketFk",
|
|
"required": true
|
|
},
|
|
"isChecked": {
|
|
"type": "hasOne",
|
|
"model": "SaleChecked",
|
|
"foreignKey": "saleFk"
|
|
}
|
|
}
|
|
}
|