fix golangci-lint check error

This commit is contained in:
jianzhiyao 2021-03-08 16:35:48 +08:00 committed by GitHub
parent f554a1c543
commit 82c4d4e134
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,23 +272,23 @@ type UnregisterModel struct {
} }
type User struct { type User struct {
ID int `orm:"column(id)"` ID int `orm:"column(id)"`
UserName string `orm:"size(30);unique"` UserName string `orm:"size(30);unique"`
Email string `orm:"size(100)"` Email string `orm:"size(100)"`
Password string `orm:"size(100)"` Password string `orm:"size(100)"`
Status int16 `orm:"column(Status)"` Status int16 `orm:"column(Status)"`
IsStaff bool IsStaff bool
IsActive bool `orm:"default(true)"` IsActive bool `orm:"default(true)"`
unexport bool `orm:"-"` Unexported bool `orm:"-"`
unexportBool bool UnexportedBool bool
Created time.Time `orm:"auto_now_add;type(date)"` Created time.Time `orm:"auto_now_add;type(date)"`
Updated time.Time `orm:"auto_now"` Updated time.Time `orm:"auto_now"`
Profile *Profile `orm:"null;rel(one);on_delete(set_null)"` Profile *Profile `orm:"null;rel(one);on_delete(set_null)"`
Posts []*Post `orm:"reverse(many)" json:"-"` Posts []*Post `orm:"reverse(many)" json:"-"`
ShouldSkip string `orm:"-"` ShouldSkip string `orm:"-"`
Nums int Nums int
Langs SliceStringField `orm:"size(100)"` Langs SliceStringField `orm:"size(100)"`
Extra JSONFieldTest `orm:"type(text)"` Extra JSONFieldTest `orm:"type(text)"`
} }
func (u *User) TableIndex() [][]string { func (u *User) TableIndex() [][]string {