hedera-web/back/common/models/order.json

121 lines
2.8 KiB
JSON
Raw Normal View History

2019-06-25 08:23:12 +00:00
{
"name": "Order",
"base": "PersistedModel",
"options": {
"mysql": {
2019-08-30 10:59:49 +00:00
"table": "hedera.order"
2019-06-25 08:23:12 +00:00
}
},
"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"
}
2019-08-30 10:59:49 +00:00
},
"taxableBase": {
"type": "Number"
},
"tax": {
"type": "Number"
},
"total": {
"type": "Number"
2019-06-25 08:23:12 +00:00
}
},
"relations": {
2019-08-30 10:59:49 +00:00
"rows": {
"type": "hasMany",
"model": "OrderRow",
"foreignKey": "orderFk"
},
2019-06-25 08:23:12 +00:00
"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"
}
}
}