model

package
v0.0.0-...-2816995 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 3 Imported by: 16

Documentation

Index

Constants

View Source
const (
	ActivityStatusNormal  = 0
	ActivityStatusDisable = 1
	ActivityStatusExpire  = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	ActivityId   int    `json:"activity_id"`   //活动Id
	ActivityName string `json:"activity_name"` //活动名称
	ProductId    int    `json:"product_id"`    //商品Id
	StartTime    int64  `json:"start_time"`    //开始时间
	EndTime      int64  `json:"end_time"`      //结束时间
	Total        int    `json:"total"`         //商品总数
	Status       int    `json:"status"`        //状态

	StartTimeStr string  `json:"start_time_str"`
	EndTimeStr   string  `json:"end_time_str"`
	StatusStr    string  `json:"status_str"`
	Speed        int     `json:"speed"`
	BuyLimit     int     `json:"buy_limit"`
	BuyRate      float64 `json:"buy_rate"`
}

type ActivityModel

type ActivityModel struct {
}

func NewActivityModel

func NewActivityModel() *ActivityModel

func (*ActivityModel) CreateActivity

func (p *ActivityModel) CreateActivity(activity *Activity) error

func (*ActivityModel) GetActivityList

func (p *ActivityModel) GetActivityList() ([]gorose.Data, error)

type Product

type Product struct {
	ProductId   int    `json:"product_id"`   //商品Id
	ProductName string `json:"product_name"` //商品名称
	Total       int    `json:"total"`        //商品数量
	Status      int    `json:"status"`       //商品状态
}

type ProductModel

type ProductModel struct {
}

func NewProductModel

func NewProductModel() *ProductModel

func (*ProductModel) CreateProduct

func (p *ProductModel) CreateProduct(product *Product) error

func (*ProductModel) GetProductList

func (p *ProductModel) GetProductList() ([]gorose.Data, error)

type SecProductInfoConf

type SecProductInfoConf struct {
	ProductId         int     `json:"product_id"`           //商品Id
	StartTime         int64   `json:"start_time"`           //开始时间
	EndTime           int64   `json:"end_time"`             //结束时间
	Status            int     `json:"status"`               //状态
	Total             int     `json:"total"`                //商品总数
	Left              int     `json:"left"`                 //剩余商品数
	OnePersonBuyLimit int     `json:"one_person_buy_limit"` //一个人购买限制
	BuyRate           float64 `json:"buy_rate"`             //买中几率
	SoldMaxLimit      int     `json:"sold_max_limit"`       //每秒最多能卖多少个
}

Jump to

Keyboard shortcuts

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