{ "name": "Order", "base": "VnModel", "options": { "mysql": { "table": "hedera.order" } }, "properties": { "id": { "type": "number", "id": true, "description": "Identifier" }, "landed": { "type": "date", "required": true, "mysql": { "columnName": "date_send" } }, "clientFk": { "type": "number", "required": true, "mysql": { "columnName": "customer_id" } }, "addressFk": { "type": "number", "required": true, "mysql": { "columnName": "address_id" } }, "agencyModeFk": { "type": "number", "required": true, "mysql": { "columnName": "agency_id" } }, "companyFk": { "type": "number", "required": true, "mysql": { "columnName": "company_id" } }, "note": { "type": "string" }, "sourceApp": { "type": "string", "mysql": { "columnName": "source_app" } }, "isConfirmed": { "type": "number", "mysql": { "columnName": "confirmed" } }, "created": { "type": "date", "mysql": { "columnName": "date_make" } }, "firstRowStamp": { "type": "date", "mysql": { "columnName": "first_row_stamp" } }, "confirmed": { "type": "date", "mysql": { "columnName": "confirm_date" } }, "total": { "type": "number" } }, "relations": { "agencyMode": { "type": "belongsTo", "model": "AgencyMode", "foreignKey": "agency_id" }, "address": { "type": "belongsTo", "model": "Address", "foreignKey": "address_id" }, "client": { "type": "belongsTo", "model": "Client", "foreignKey": "customer_id" }, "deliveryMethod": { "type": "belongsTo", "model": "DeliveryMethod", "foreignKey": "delivery_method_id" }, "rows": { "type": "hasMany", "model": "OrderRow", "foreignKey": "orderFk" }, "company": { "type": "belongsTo", "model": "Company", "foreignKey": "company_id" } } }