Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitOrderTable ¶
Types ¶
type Order ¶
type Order interface { InsertOrder(ctx context.Context, od Orders) error UpdateOrder(ctx context.Context, od Orders) error DeleteOrder(ctx context.Context, sn string, uid int32) error SearchOrder(ctx context.Context, od Orders, page int, size int) ([]Orders, error) QueryOrderByUid(ctx context.Context, uid, page, size int32) ([]Orders, error) }
type OrderGoods ¶
type OrderGoods struct { Id int32 `gorm:"type:int;primaryKey;autoIncrement;not null"` OrderSn string `gorm:"index;not null"` GoodsId int32 `gorm:"type:int;not null"` Price float32 `gorm:"type:decimal(10,2);not null"` Nums int32 `gorm:"type:int;not null"` CreateAt int64 `gorm:"type:int;not null"` UpdateAt int64 `gorm:"type:int;not null"` DeleteAt gorm.DeletedAt `gorm:"type:int;not null"` }
type Orders ¶
type Orders struct { Id int32 `gorm:"type:int;primaryKey;autoIncrement;not null"` UserId int32 `gorm:"type:int;index;not null"` OrderSn string `gorm:"type:varchar(50);uniqueIndex;not null"` PayType string `gorm:"type:varchar(20);not null; comment 'alipay(支付宝), wechat(微信)'"` Status int32 `gorm:"type:int;index;not null; comment '0(未支付), 1(支付成功), 2(支付失败), 3(超时未支付)'"` PayTime int64 `gorm:"type:int;not null"` Amount float32 `gorm:"type:decimal(10,2);not null"` Address string `gorm:"type:varchar(255);not null"` Phone string `gorm:"type:varchar(11);not null"` CreateAt int64 `gorm:"type:int;not null"` UpdateAt int64 `gorm:"type:int;not null"` DeleteAt gorm.DeletedAt `gorm:"type:int;not null"` }
Click to show internal directories.
Click to hide internal directories.