Skip to content

vutran1305/flaskApi

Repository files navigation

flaskApi

  • Python 3.9.0

package

  • flask
  • python-dotenvn
  • SQLAlchemy
  • marshmallow-sqlalchemy
  • Flask-Migrate
  • flask_marshmallow
  • flask-cors

API

Shop

'/uploadShop/ , moethods = POST : upload ảnh shop

'/shop/' , methods = ['GET'] : Xem thông tin tất cả các shop

  • Kết quả ví dụ:

image

'/shop/' , methods = ['POST']) : Thêm shop mới , gửi request là đến server là chuỗi json , nhận lại Response là thông tin shop

  • Ví dụ :
  • image

'/shop/int:shop_id' , methods = ['GET','PUT','DELETE'] : Xem sửa xóa shop ,kết quả trả về là thông tin shop đc chọn

  • VD methods = PUT
  • image
  • VD methods = DELETE
  • image

'/shop/int:shop_id/food/' , methods = ['POST'] : Thêm món ăn mới vào shop

  • Ví dụ
  • image

'/shop/int:shop_id/food/int:food_id' , methods = ['GET','PUT','DELETE'] : Xem sửa xóa món ăn của shop

  • VD methods = PUT
  • request chuỗi json { "name" : tên shop , "address" : địa chỉ , "phone" : sđt , "shop_pictures" }

'/order/' , methods = ['POST'] : Đặt món ăn

  • image

'/order/int:order_id' , methods = ['PUT'] : Hủy đơn hàng

  • Ví dụ
  • image

'/history/' , methods = ['GET'] : Xem lịch sử đặt hàng

  • Ví dụ:
  • image

'/history/int:order_id' , methods = ['GET'] : Xem thông tin đơn hàng

  • image

'/history/int:order_id/bill/int:bill_id' , methods = ['GET'] : Xem chi tiết từng bill

  • image

'/history/canceled/' , methods = ['GET'] :Xem tất cả các đơn hàng đã bị hủy

  • image

'/statistical/' , methods = ['POST']: Thống kê đặt hàng trong tháng

image

  • Trong đó :
  • order_canceled : số đơn hàng bị hủy
  • completed : Số tiền đã hoàn thành
  • pending : Số tiền còn đang thiếu
  • order_completed : số đơn hàng đã hoàn thành

'/admin/daily_order/' , methods = ['GET'] : Xem tất cả đơn hàng các user đặt trong ngày hôm nay

'/admin/all_order/' , methods = ['GET'] : Xem tất cả đơn hàng

'/admin/repair_bill/int:order_id' , methods = ['PUT'] : Sửa trạng thái bill ( chưa thanh toán - > đã thanh toán và ngc lại ))

'/admin/statistical/today' , methods = ['GET'] : Xem thống kê danh sách và số lượng các món ăn đã đặt hôm nay

Gộp đơn

'/confirm/' methods = ['POST','GET'] : Xem tất cả đơn gộp hoặc tạo 1 đơn gộp

  • image

'/confirm/<orders_id>' methods = ['GET'] : Xem từng đơn gộp

'/confirm/<orders_id>/order/<order_id>' methods = ['GET'] : Chi tiết từng order trong mỗi đơn gộp

'/food/' methods = ['GET']) : tất cả món ăn

'/food/<food_id>' methods = ['GET','DELETE','PUT']) : xem , sửa từng món

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published