model

package
v0.0.0-...-cd595cc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UserAuthMiddleware *jwt.HertzJWTMiddleware
	ShopAuthMiddleware *jwt.HertzJWTMiddleware
)

Functions

func SendResponse

func SendResponse(c *app.RequestContext, err error, data interface{})

SendResponse pack response

Types

type AddProductRequest

type AddProductRequest struct {
	Name        string `json:"name"`
	Pic         string `json:"pic"`
	Description string `json:"description"`
	ISBN        string `json:"isbn"`
	SpuName     string `json:"spu_name"`
	SpuPrice    int64  `json:"spu_price"`
	Price       int64  `json:"price"`
	Stock       int64  `json:"stock"`
}

type CancelOrderReq

type CancelOrderReq struct {
	OrderId string `json:"order_id"`
}

type CreateOrderReq

type CreateOrderReq struct {
	Address   string `json:"address"`
	ProductId string `json:"product_id"`
	StockNum  int64  `json:"stock_num"`
}

type EditProductRequest

type EditProductRequest struct {
	ProductId   string  `json:"product_id"`
	Name        *string `json:"name"`
	Pic         *string `json:"pic"`
	Description *string `json:"description"`
	ISBN        *string `json:"isbn"`
	SpuName     *string `json:"spu_name"`
	SpuPrice    *int64  `json:"spu_price"`
	Price       *int64  `json:"price"`
	Stock       *int64  `json:"stock"`
}

type ListOrderReq

type ListOrderReq struct {
	Status *int64 `json:"status"`
}

type ListProductReq

type ListProductReq struct {
	Name    *string `json:"name"`
	SpuName *string `json:"spu_name"`
	Status  *int64  `json:"status"`
}

type LoginResponse

type LoginResponse struct {
	Code   int64  `json:"code"`
	Expire string `json:"expire"`
	Token  string `json:"token"`
}

type OperateProductReq

type OperateProductReq struct {
	ProductId string `json:"product_id"`
}

type Response

type Response struct {
	Code    int64       `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

type SearchProductReq

type SearchProductReq struct {
	Name        *string `json:"name"`
	Description *string `json:"description"`
	SpuName     *string `json:"spu_name"`
}

type UserParam

type UserParam struct {
	UserName string `json:"username"`
	PassWord string `json:"password"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL