- Product Definition (B) (Product)
- WareHouse Definition (B) (Stock)
- Procurement (B) (Stock)
- On Shelf (B) (Shelf)
- User Purchase (F) (Order)
- Delivery: export shipping orders (B) (Delivery)
- Supplier Definition (B) (Stock)
- Procurement:virtual (B) (Stock)
- Procurement:proxy (B) (Stock)
- Off Shelf (B) (Shelf)
- Auto Shelf (P2) (B) (Shelf)
- Procurement: real (B) (Shelf)
- Delivery:return ticket (B) (Delivery)
- Campaigns (BF) (Shelf?)
- Order: refund (BF) (Order)
- Order: cancel (F) (Order)
- Order: change address (F) (Order)
- add product to cart (F) (Order)
- pay for order -> brokerage calculation , user bill (F) (Order)
- User: set promoter level and relations (B) (User)
- User: owner change info (F) (User)
- User: withdraw brokerage (User)
- User: apply to be promoter (User)
mall operator create a new product
- Product
- sku
purchasing clerk procure products from suppier,and put them into warehouse
Procurement(timestamp,warehouse, List[ProcurementItem], origin_ticket_photo, supplier)
ProcurementItem: sku, price, amount
increase the stock
- Procurement (ActionTaken) [optional]
- Stock (Status) product,sku,count,warehouse
mall operator make the product on shelf so that the product cound be sold during the specifeid time segment. mall operator also need to set the price of the product/sku. the price including all the price for different level of promoters, shipping fees(freight),
OnShelf(product,List[OnShelfItem],start_time,end_time)
OnShelfItem: sku,count,Price Price: price for all levels, origin price to show,freight
- count must less than total stock of all warehouse
- if time is null, onshelf immediately
- update OnShelf strategy (take effect at queries for onshelf products)
- update OnShelfHistory [optional]
- Stock
- OnShelf (Status,strategy) : product(pk),state,start_time,end_time,location(normal|hot list|activity...),List[OnShelfItem]
- OnShelfItem: sku,on_shelf_count,stock
- OnShelfHistory (ActionTaken) [optional]
products on shelf at this moment
- OnShelf
- Product
may recalculated by adjust the pay options
Order ReviewOrder(List[PurchaseItem],...)
PurchaseItem: product,sku,count
- product is on shelf
- onshelf stock is greater than 0
- sku stock is greater than 0
persist order(per user) to remeber what showed to user,especially prices calculate prices,including: total price,deductions,shipping price,pay price
- Stock: product,sku,count,warehouse
- OnShelf: price info
- User: brokerage/integral/coupon for deduction
- Order: user,address,pay method(wechat/balance),deduction method(brokerage/integral),deliver method,List[PurchaseItem]
- PurchaseItem: product,sku,count,warehouse,shelf
- OrderCreated
- check stock & onshelf (optional)
Calculated order
user confirm the order
ConfirmOrder(orderId)
- found an warehouse which have enough stock,
- place an order, link the order and the warehouse
- decease the onshelf stock (OnShelfItem.stock)
- decrease the stock of the warehouse
- note: should do reverse operations when order has been canceled
- wait user 30 min to pay
- OrderConfirmed
- stock & onshelf decrease
- user conpon,brokerage,integral dedeuction
- reset cart
mall operator export shipping orders for one warehouse.
ExportShippingOrders(warehouse,[carrier],isReExport*)
- can support: regenerate deliveries when isReExport is true [optional]
- find paid orders in specfied time segment for one warehouse (and no Delivery already generated for these orders)
- generate shipping orders(entity:Delivery) for orders, combine when nessesary (same address)
- Orders
- Delivery: warehouse,List[DeliveryItem],carrier,price,Destination
- DeliveryItem: product/sku,count,order
- Destination: address,name,phone