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 Pay

type Pay struct {
	Id         int64     `db:"id"`
	Uid        int64     `db:"uid"`    // 用户ID
	Oid        int64     `db:"oid"`    // 订单ID
	Amount     int64     `db:"amount"` // 产品金额
	Source     int64     `db:"source"` // 支付方式
	Status     int64     `db:"status"` // 支付状态
	CreateTime time.Time `db:"create_time"`
	UpdateTime time.Time `db:"update_time"`
}

type PayModel

type PayModel interface {
	Insert(data *Pay) (sql.Result, error)
	FindOne(id int64) (*Pay, error)
	FindOneByOid(oid int64) (*Pay, error)
	Update(data *Pay) error
	Delete(id int64) error
}

func NewPayModel

func NewPayModel(conn sqlx.SqlConn, c cache.CacheConf) PayModel

Jump to

Keyboard shortcuts

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