Initial commit: 商品售卖网站
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package schemas
|
||||
|
||||
type AddToCartRequest struct {
|
||||
ProductID uint `json:"product_id" binding:"required"`
|
||||
Quantity int `json:"quantity" binding:"required,min=1"`
|
||||
}
|
||||
|
||||
type UpdateCartRequest struct {
|
||||
Quantity int `json:"quantity" binding:"required,min=1"`
|
||||
}
|
||||
|
||||
type CreateOrderRequest struct {
|
||||
ShippingAddressID uint `json:"shipping_address_id" binding:"required"`
|
||||
PaymentMethod string `json:"payment_method"`
|
||||
}
|
||||
|
||||
type RefundRequest struct {
|
||||
Reason string `json:"reason" binding:"required"`
|
||||
}
|
||||
|
||||
type ShipOrderRequest struct {
|
||||
TrackingNumber string `json:"tracking_number" binding:"required"`
|
||||
ShippingPhoto string `json:"shipping_photo"`
|
||||
ExpressPhoto string `json:"express_photo"`
|
||||
CustomsPhoto string `json:"customs_photo"`
|
||||
}
|
||||
|
||||
type ProcessRefundRequest struct {
|
||||
Status string `json:"status" binding:"required,oneof=approved rejected"`
|
||||
}
|
||||
Reference in New Issue
Block a user