model

package
v0.0.0-...-e1bfe29 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: MulanPSL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound

Functions

This section is empty.

Types

type Point

type Point struct {
	Id         int64     `db:"id"`
	Balance    int64     `db:"balance"`     // 积分剩余数量
	Canuse     int64     `db:"canuse"`      // 积分可用数
	Locking    int64     `db:"locking"`     // 积分锁定数
	UserId     int64     `db:"user_id"`     // 用户id
	CreateTime time.Time `db:"create_time"` // 创建时间
	UpdateTime time.Time `db:"update_time"` // 更新时间
}

type PointModel

type PointModel interface {

	// SaveUserPointTrans customer methods
	SaveUserPointTrans(ctx context.Context, data *Point) error
	// contains filtered or unexported methods
}

PointModel is an interface to be customized, add more methods here, and implement the added methods in customPointModel.

func NewPointModel

func NewPointModel(conn sqlx.SqlConn, c cache.CacheConf) PointModel

NewPointModel returns a model for the database table.

type PointRecord

type PointRecord struct {
	Id         int64     `db:"id"`
	UserId     int64     `db:"user_id"`     // 用户id
	Quantity   int64     `db:"quantity"`    // 积分数量
	Type       string    `db:"type"`        // 操作类型
	CreateTime time.Time `db:"create_time"` // 创建时间
	UpdateTime time.Time `db:"update_time"` // 更新时间
}

type PointRecordModel

type PointRecordModel interface {
	Count() (*int64, error)
	UserPointRecordPage(pq modelx.PageReq, pr PointRecord) (*modelx.PageRes[*PointRecord], error)
	// contains filtered or unexported methods
}

PointRecordModel is an interface to be customized, add more methods here, and implement the added methods in customPointRecordModel.

func NewPointRecordModel

func NewPointRecordModel(conn sqlx.SqlConn, c cache.CacheConf) PointRecordModel

NewPointRecordModel returns a model for the database table.

Jump to

Keyboard shortcuts

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