Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //新建时要操作的字段 CreateColumns = []string{"creator_id", "creator", "creator_ip", "created_at"} //更新时要操作的字段 UpdateColumns = []string{"updater_id", "updater", "updater_ip", "updated_at"} //删除时要操作得字段 DeleteColumns = append(UpdateColumns, "delete_tag") )
View Source
var ( //DB is sqlx.DB对象 DB *sqlx.DB )
Functions ¶
Types ¶
type PagerQuery ¶
PagerQuery 分页查询参数
type PagerResult ¶
type PagerResult struct { Total int64 `json:"total,string"` PageSize int `json:"pagesize"` PageIndex int `json:"pageindex"` }
PagerResult 分页查询返回值
type Snowflake ¶
A Snowflake struct holds the basic information needed for a snowflake generator worker
func NewSnowflake ¶
NewSnowflake returns a new snowflake worker that can be used to generate snowflake IDs
type TableBase ¶ added in v0.0.5
type TableBase struct { ID int64 `json:"id,string" db:"id"` CreatorID int64 `json:"creator_id" db:"creator_id"` Creator string `json:"creator" db:"creator"` CreatorIP string `json:"creator_ip" db:"creator_ip"` CreatedAt string `json:"created_at" db:"created_at"` UpdaterID int64 `json:"updater_id" db:"updater_id"` Updater string `json:"updater" db:"updater"` UpdaterIP string `json:"updater_ip" db:"updater_ip"` UpdatedAt string `json:"updated_at" db:"updated_at" gorm:"default:NULL"` DeleteTag int `json:"delete_tag" db:"delete_tag"` }
TableBase 包含基础字段
Click to show internal directories.
Click to hide internal directories.