Documentation ¶
Index ¶
- Variables
- func CreateTable()
- func Orm() *gorm.DB
- type Order
- func (*Order) Delete(db *gormx.DB, where string, args ...interface{}) error
- func (*Order) GetCount(where string, args ...interface{}) (int, error)
- func (*Order) GetList(where string, args ...interface{}) ([]*Order, error)
- func (*Order) GetListWithLimit(limit int, where string, args ...interface{}) ([]*Order, error)
- func (*Order) GetOne(where string, args ...interface{}) (*Order, error)
- func (*Order) Insert(db *gormx.DB, data *Order) error
- func (*Order) TableName() string
- func (*Order) Update(db *gormx.DB, data map[string]interface{}, where string, args ...interface{}) error
- type TxRecord
- func (*TxRecord) Delete(db *gormx.DB, where string, args ...interface{}) error
- func (*TxRecord) GetCount(where string, args ...interface{}) (int, error)
- func (*TxRecord) GetList(where string, args ...interface{}) ([]*TxRecord, error)
- func (*TxRecord) GetListWithLimit(limit int, where string, args ...interface{}) ([]*TxRecord, error)
- func (*TxRecord) GetOne(where string, args ...interface{}) (*TxRecord, error)
- func (*TxRecord) Insert(db *gormx.DB, data *TxRecord) error
- func (*TxRecord) TableName() string
- func (*TxRecord) Update(db *gormx.DB, data map[string]interface{}, where string, args ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var OrderHandler = &Order{}
View Source
var TxRecordHandler = &TxRecord{}
Functions ¶
func CreateTable ¶
func CreateTable()
Types ¶
type Order ¶
type Order struct { Id int64 `json:"id" gorm:"primary_key;type:int AUTO_INCREMENT"` 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"` }
Order 订单表
func (*Order) GetListWithLimit ¶
type TxRecord ¶
type TxRecord struct { Id int64 `json:"id" gorm:"primary_key;type:int AUTO_INCREMENT"` TxId int64 `json:"tx_id" gorm:"column:tx_id;type:int NOT NULL;default:0;comment:'tx_id';index"` MysqlId int64 `json:"mysql_id" gorm:"column:mysql_id;type:int NOT NULL;default:0;comment:'mysql_id';index"` Status int64 `json:"status" gorm:"column:status;type:int NOT NULL;default:0;comment:'status';index"` Content string `json:"content" gorm:"column:content;type:varchar(255) NOT NULL;default:'';comment:'事务数据'"` //正常配置 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 (*TxRecord) GetListWithLimit ¶
Click to show internal directories.
Click to hide internal directories.