|
id
|
char(36)
|
|
|
uuid()
|
|
order_number
|
varchar(20)
|
|
|
|
|
customer_id
|
char(36)
|
|
|
Browse foreign values
|
|
restaurant_id
|
char(36)
|
|
|
Browse foreign values
|
|
driver_id
|
char(36)
|
|
|
Browse foreign values
|
|
status
|
enum
|
-- |
|
pending
|
|
subtotal
|
decimal(10,2)
|
|
|
|
|
delivery_fee
|
decimal(10,2)
|
|
|
|
|
tax
|
decimal(10,2)
|
|
|
|
|
discount
|
decimal(10,2)
|
|
|
0.00
|
|
total_amount
|
decimal(10,2)
|
|
|
|
|
payment_method
|
enum
|
-- |
|
|
|
payment_status
|
enum
|
-- |
|
pending
|
|
delivery_address
|
text
|
|
|
|
|
delivery_lat
|
decimal(10,8)
|
|
|
|
|
delivery_lng
|
decimal(11,8)
|
|
|
|
|
customer_notes
|
text
|
|
|
|
|
driver_notes
|
text
|
|
|
|
|
scheduled_time
|
timestamp
|
|
|
|
|
confirmed_at
|
timestamp
|
|
|
|
|
ready_at
|
timestamp
|
|
|
|
|
picked_up_at
|
timestamp
|
|
|
|
|
delivered_at
|
timestamp
|
|
|
|
|
cancelled_at
|
timestamp
|
|
|
|
|
cancellation_reason
|
text
|
|
|
|
|
created_at
|
timestamp
|
|
|
current_timestamp()
|