Documentation
¶
Overview ¶
Package database
@author: xwc1125
Package database ¶
@author: xwc1125
Index ¶
Constants ¶
View Source
const ( StatusType_Delete = iota - 1 StatusType_Disable StatusType_Ok StatusType_NotApproved )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CursorResult ¶
type CursorResult struct {
Results interface{} `json:"results"` // 数据
Cursor string `json:"cursor"` // 下一页
}
CursorResult Cursor分页返回数据
type ModelBy ¶
type ModelID ¶
type ModelID struct {
Id int64 `` // ID
/* 154-byte string literal not displayed */
}
type ModelStatus ¶
type ModelTime ¶
type ModelTime struct {
CreatedAt int64 `` // 创建时间(毫秒)
/* 175-byte string literal not displayed */
UpdatedAt int64 `` // 更新时间(毫秒)
/* 175-byte string literal not displayed */
DeletedAt int64 `json:"-" xorm:"bigint(15) deleted comment('删除时间(毫秒)')" gorm:"type:bigint(15);index;comment:删除时间(毫秒)"` // 删除时间(毫秒)
}
type MysqlConfig ¶
type MysqlConfig struct {
Driver string `json:"driver" mapstructure:"driver"`
Url string `json:"url" mapstructure:"url"`
Username string `json:"username" mapstructure:"username"`
Password string `json:"password" mapstructure:"password"`
Secret string `json:"secret" mapstructure:"secret"`
MaxIdleConns int `json:"max_idle_conns" mapstructure:"max_idle_conns"`
MaxOpenConns int `json:"max_open_conns" mapstructure:"max_open_conns"`
ConnMaxLifetime int `json:"conn_max_lifetime" mapstructure:"conn_max_lifetime"`
ConnMaxIdleTime int `json:"conn_max_idle_time" mapstructure:"conn_max_idle_time"`
PrefixTable string `json:"prefix_table" mapstructure:"prefix_table"`
PrefixColumn string `json:"prefix_column" mapstructure:"prefix_column"`
ShowSQL bool `json:"show_sql" mapstructure:"show_sql"`
LogLevel int `json:"log_level" mapstructure:"log_level"`
}
type PageResult ¶
type PageResult struct {
Page *Paging `json:"page"` // 分页信息
Results interface{} `json:"results"` // 数据
}
PageResult 分页返回数据
type PageWhereOrder ¶
PageWhereOrder 分页条件
Click to show internal directories.
Click to hide internal directories.