Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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 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.