Changes
Page history
Update Database design
authored
Feb 20, 2022
by
Josh Sun
Hide whitespace changes
Inline
Side-by-side
Database-design.md
View page @
35e1af8c
Table name
CREATE SCHEMA
`FreshOnline`
;
\ No newline at end of file
stocked_goods: (id:int, name:varchar, type: tinyint, price: decimal2, storage: decimal2, sales: decimal2, description: text(NULL), onsale: tinyint, sale_price: decimal2(NULL), rate: float(NULL), rate_count: int(DEFAULT 0), brand: varchar, category_id: int, isnew: tinyint, pic: varchar500(多值属性 NULL)) type==0:discrete,type==1:weight
category(id:int, name: varchar, parent_id:int)
saled_goods: (order_id, goods_id, price:decimal2, count:decimal2, comment: text(NULL), rate: int(NULL))
orders: (order_id, user_id, payment_method_id(NULL), order_time:datetime, pay_time:datetime(NULL), finish_time:datetime(NULL), status: tinyint, location: varchar500)
// statues 已付款 已送达 订单已完成
user: (id, password:varchar(hashed), name: varchar, token: varchar, email:varchar(hashed), type:tinyint, location: varchar500(多值属性, NULL))
payment_method: (id, user_id, payment_type:tinyint, details: json(encrypted, salt=password))
cart: (user_id, goods_id, count:decimal2)
favorite: (user_id, goods_id)
\ No newline at end of file