dto

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CartAddReq

type CartAddReq struct {
	UserId   int `validate:"required"` //用户id
	GoodsId  int `validate:"required"` //商品id
	GoodsNum int `validate:"required"` //商品数
}

type CartItemRes

type CartItemRes struct {
	TotalPrice int //总价
	Items      []struct {
		Id         int    //购物车项ID
		GoodsId    int    //商品id
		GoodsName  string //商品名称
		GoodsNum   int    //商品数量
		TotalPrice int    //商品价格
	}
}

type ChangePasswordReq

type ChangePasswordReq struct {
	Id          int
	NewPassword string `validate:"required"`
	OldPassword string `validate:"required"`
}

type GoodsAddReq

type GoodsAddReq struct {
	Name  string `validate:"required"`
	Price int    `validate:"min=10,max=100000"` //最小价格10,最大价格100000
}

type GoodsItemRes

type GoodsItemRes struct {
	Id    int    //商品id
	Name  string //商品名称
	Price int    //商品价格
	Stock int    //商品库存
	Tag   string //商品tag
}

type GoodsShopReq

type GoodsShopReq struct {
	UserId int `validate:"required"` //用户id
	Id     int `validate:"required"` //商品id
	Num    int `validate:"required"` //商品数量
}

type GoodsTagReq

type GoodsTagReq struct {
	Id  int    `validate:"required"`
	Tag string `validate:"oneof=HOT NEW NONE"` //要设置的标签必须是 热门,新品,默认
}

type RegisterUserReq

type RegisterUserReq struct {
	Name     string `validate:"required"` //用户名称
	Password string `validate:"required"` //用户密码
}

type UserInfoRes

type UserInfoRes struct {
	Id    int    //用户id
	Name  string //用户名
	Money int    //用户金钱
}

Jump to

Keyboard shortcuts

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