Documentation ¶
Index ¶
- Variables
- func CreateTable()
- func Orm() *gorm.DB
- type Tx
- func (*Tx) Delete(db *gormx.DB, where string, args ...interface{}) error
- func (*Tx) GetCount(where string, args ...interface{}) (int, error)
- func (*Tx) GetList(where string, args ...interface{}) ([]*Tx, error)
- func (*Tx) GetListWithLimit(limit int, where string, args ...interface{}) ([]*Tx, error)
- func (*Tx) GetOne(where string, args ...interface{}) (*Tx, error)
- func (*Tx) Insert(db *gormx.DB, data *Tx) error
- func (*Tx) TableName() string
- func (*Tx) Update(db *gormx.DB, data map[string]interface{}, where string, args ...interface{}) (int64, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var TxHandler = &Tx{}
Functions ¶
func CreateTable ¶
func CreateTable()
Types ¶
type Tx ¶
type Tx struct { Id int64 `json:"id" gorm:"primary_key;type:int AUTO_INCREMENT"` Uid int64 `json:"uid" gorm:"column:uid;type:int NOT NULL;default:0;comment:'用户id';index"` Status int64 `json:"status" gorm:"column:status;type:int NOT NULL;default:0;comment:'0未支付,1已支付';index"` //正常配置 CreatedAt time.Time `json:"created_at" gorm:"column:created_at;NOT NULL;default:CURRENT_TIMESTAMP;type:TIMESTAMP"` UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at;NOT NULL;default:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;type:TIMESTAMP"` DeletedAt *time.Time `json:"deleted_at" gorm:"column:deleted_at;type:DATETIME"` }
事务记录表
func (*Tx) GetListWithLimit ¶
Click to show internal directories.
Click to hide internal directories.