model

package
v0.0.0-...-2304a10 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound

Functions

This section is empty.

Types

type Order

type Order struct {
	Id         int64     `db:"id"`
	Uid        int64     `db:"uid"`    // 用户ID
	Pid        int64     `db:"pid"`    // 产品ID
	Amount     int64     `db:"amount"` // 订单金额
	Status     int64     `db:"status"` // 订单状态
	CreateTime time.Time `db:"create_time"`
	UpdateTime time.Time `db:"update_time"`
}

type OrderModel

type OrderModel interface {
	Insert(data *Order) (sql.Result, error)
	FindOne(id int64) (*Order, error)
	Update(data *Order) error
	Delete(id int64) error
	FindAllByUid(uid int64) ([]*Order, error)
}

func NewOrderModel

func NewOrderModel(conn sqlx.SqlConn, c cache.CacheConf) OrderModel

Jump to

Keyboard shortcuts

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