model

package
v0.0.0-...-f04d0a5 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound

Functions

This section is empty.

Types

type Coupons

type Coupons struct {
	Id        uint64       `db:"id"`         // 优惠券ID
	Name      string       `db:"name"`       // 优惠券�称
	Code      string       `db:"code"`       // 优惠券�
	Type      int64        `db:"type"`       // 优惠券类型 1:满� 2:折扣 3:立�
	Value     float64      `db:"value"`      // 优惠金�或折扣率
	MinAmount float64      `db:"min_amount"` // 最低使用金�
	Status    int64        `db:"status"`     // 状� 0:未开始 1:进行中 2:已结� 3:已失效
	StartTime sql.NullTime `db:"start_time"` // 开始时间
	EndTime   sql.NullTime `db:"end_time"`   // 结�时间
	Total     int64        `db:"total"`      // �行总�
	Received  int64        `db:"received"`   // 已领�数�
	Used      int64        `db:"used"`       // 已使用数�
	PerLimit  int64        `db:"per_limit"`  // 是��制�人领�数�
	UserLimit int64        `db:"user_limit"` // �人�领数�
	CreatedAt time.Time    `db:"created_at"` // 创建时间
	UpdatedAt time.Time    `db:"updated_at"` // 更新时间
}

type CouponsModel

type CouponsModel interface {
	// contains filtered or unexported methods
}

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

func NewCouponsModel

func NewCouponsModel(conn sqlx.SqlConn) CouponsModel

NewCouponsModel returns a model for the database table.

type PointsRecords

type PointsRecords struct {
	Id        uint64         `db:"id"`         // 记录ID
	UserId    uint64         `db:"user_id"`    // 用户ID
	Points    int64          `db:"points"`     // 积分�动数�
	Type      int64          `db:"type"`       // 类型 1:获� 2:使用
	Source    string         `db:"source"`     // ��
	Remark    sql.NullString `db:"remark"`     // 备注
	OrderNo   sql.NullString `db:"order_no"`   // 订��
	CreatedAt time.Time      `db:"created_at"` // 创建时间
}

type PointsRecordsModel

type PointsRecordsModel interface {
	// contains filtered or unexported methods
}

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

func NewPointsRecordsModel

func NewPointsRecordsModel(conn sqlx.SqlConn) PointsRecordsModel

NewPointsRecordsModel returns a model for the database table.

type Promotions

type Promotions struct {
	Id        uint64       `db:"id"`         // 活动ID
	Name      string       `db:"name"`       // 活动�称
	Type      int64        `db:"type"`       // 活动类型 1:满� 2:折扣 3:秒�
	Rules     string       `db:"rules"`      // 促销规则
	Status    int64        `db:"status"`     // 状� 0:未开始 1:进行中 2:已结�
	StartTime sql.NullTime `db:"start_time"` // 开始时间
	EndTime   sql.NullTime `db:"end_time"`   // 结�时间
	CreatedAt time.Time    `db:"created_at"` // 创建时间
	UpdatedAt time.Time    `db:"updated_at"` // 更新时间
}

type PromotionsModel

type PromotionsModel interface {
	// contains filtered or unexported methods
}

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

func NewPromotionsModel

func NewPromotionsModel(conn sqlx.SqlConn) PromotionsModel

NewPromotionsModel returns a model for the database table.

type UserCoupons

type UserCoupons struct {
	Id        uint64         `db:"id"`         // ID
	UserId    uint64         `db:"user_id"`    // 用户ID
	CouponId  uint64         `db:"coupon_id"`  // 优惠券ID
	Status    int64          `db:"status"`     // 状� 0:未使用 1:已使用 2:已过期
	UsedTime  sql.NullTime   `db:"used_time"`  // 使用时间
	OrderNo   sql.NullString `db:"order_no"`   // 订��
	CreatedAt time.Time      `db:"created_at"` // 创建时间
}

type UserCouponsModel

type UserCouponsModel interface {
	// contains filtered or unexported methods
}

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

func NewUserCouponsModel

func NewUserCouponsModel(conn sqlx.SqlConn) UserCouponsModel

NewUserCouponsModel returns a model for the database table.

type UserPoints

type UserPoints struct {
	UserId      uint64    `db:"user_id"`      // 用户ID
	Points      int64     `db:"points"`       // 积分余�
	TotalPoints int64     `db:"total_points"` // 累计获得积分
	UsedPoints  int64     `db:"used_points"`  // 已使用积分
	UpdatedAt   time.Time `db:"updated_at"`   // 更新时间
}

type UserPointsModel

type UserPointsModel interface {
	// contains filtered or unexported methods
}

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

func NewUserPointsModel

func NewUserPointsModel(conn sqlx.SqlConn) UserPointsModel

NewUserPointsModel 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