Advertisement
the_web_fly

order table sql structure proposal

Jan 31st, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. table name 'orders'; auto_incremmented && primary (unique_id) ; indexed (order_id);
  2.  
  3. *columns*
  4.  
  5. 1).     'unique_id' -> auto incremented order id generated for specific targetting of orders
  6. 2).     'user_id'   -> the id of the user that is making the order requiring tht every visitor must have an account before ordering a product
  7. 3). 'product_id'-> unque_id of the product on it's own database
  8. 4). 'seller_id' -> *at beginnig not yet relevant* but should in the futeure note who sells that product
  9. 5). 'order_date' -> the full date of he order
  10. 6). 'fulfil_date'=> full date of the order when it is completed (user has received product ? shipped)
  11. 7). 'status' -> status of the order through ['pending' => 'order have been made'],
  12.                         ['rejected' => 'for some reason admin rejects the order'],
  13.                         ['approved' => 'order have been reviewed and accepted by admin'],
  14.                         ['active' => 'order have been made to the respective order site'],
  15.                         ['shipped' => 'order have been shipped to the respective user'],
  16.                         ['delivered' => 'user have received product successfully'],
  17.                        
  18. 8). 'description' -> any not that is left by the user concerning the order [optional]
  19. 9).     'selections' -> an array of user selection for orders like (color, size,ram... etc)
  20. 10).    'order_id' -> PS: differnt from unique_id, this is the id that would be indexed and actually given to the user somehat like (ALI-189219)
  21. 11).    'price'     -> price of product
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement