Skip to content

Instantly share code, notes, and snippets.

@dinesh1301
Last active April 20, 2021 08:13
Show Gist options
  • Save dinesh1301/2c5614b8d608635b8176f72034b63187 to your computer and use it in GitHub Desktop.
Save dinesh1301/2c5614b8d608635b8176f72034b63187 to your computer and use it in GitHub Desktop.

Models

  1. User
    • name
    • mobile Number
    • Profile pic
    • type: shop_owner/reseller
  2. Shop
    • name
    • address (FK)
    • owner (FK to User)
    • logo
  3. Order
    • item (FK)
    • shop (FK)
    • placed_by (FK to User)
    • drop_address (FK to Address)
    • state: pending_approval/approved/rejected/delivered
  4. Address
    • latitude
    • longitude
    • pincode
    • address
    • city
    • state
  5. Item
    • pics (List of image urls)
    • Name
    • Description

APIs to be needed

  1. reseller/ method: POST, adds a reseller
  2. sales-summary, method: GET, List of all resellers along with no. of orders they have sold, Also, total sales made
  3. review-order, method: POST, approve/reject a particular order

Notifications

  • When owner adds a reseller, Whatsapp to: Reseller
  • As soon as the order is punched in via admin, Whatsapp to: Reseller, notification to Owner
  • Owner approves/rejects the order,Whatsapp to: Reseller
  • Order gets delivered, sent to: Whatsapp to Reseller, Notification to Owner

Admin

  1. Add owners
  2. Punch in orders
  3. Change status of order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment