You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.2 KiB
Go

package models
type Base struct {
Id int `json:"id" gorm:"column:id;type:int(10);primary_key;not null;autoIncrement;comment:主键"`
Vchar string `json:"vchar" gorm:"column:vchar;type:varchar(255);comment:varchar类型文本"`
MedText string `json:"med_text" gorm:"column:med_text;type:mediumtext;comment:mediumtext类型文本"`
CreateTime int `json:"create_time" gorm:"column:create_time;type:int(10);not null;autoCreateTime;comment:创建时间"`
UpdateTime int `json:"update_time" gorm:"column:update_time;type:int(10);not null;autoUpdateTime;comment:更新时间"`
IsDel int `json:"is_del" gorm:"column:is_del;type:int(1);not null;comment:是否已删除"`
}
func (m *Base) TableName() string {
return "base"
}
type Page struct {
Size int `form:"pageSize" json:"page_size"`
Index int `form:"page" json:"page"`
MaxPage int64 `json:"max_page"`
Total int `json:"total"`
List interface{} `json:"list"`
}
type PageQuery struct {
Size int `form:"page_size" json:"page_size"`
Index int `form:"page_index" json:"page_index"`
Total int64 `json:"total_page"`
List interface{} `json:"list"`
}