salix/modules/order/back/models/order.json

117 lines
2.7 KiB
JSON

{
"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"
}
}
},
"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"
}
}
}