info fix table
This commit is contained in:
parent
85cd2bff8d
commit
f9595aad3f
|
@ -11,8 +11,8 @@ type FsGuest struct {
|
|||
AuthKey *string `gorm:"default:'';" json:"auth_key"` // jwt token
|
||||
Status *int64 `gorm:"index;default:1;" json:"status"` // 1正常 0不正常
|
||||
IsDel *int64 `gorm:"index;default:0;" json:"is_del"` // 是否删除 1删除
|
||||
CreatedAt *time.Time `gorm:"index;default:'0000-00-00 00:00:00';" json:"created_at"` //
|
||||
UpdatedAt *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"updated_at"` //
|
||||
Ctime *time.Time `gorm:"index;default:'0000-00-00 00:00:00';" json:"ctime"` //
|
||||
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
|
||||
IsOpenRender *int64 `gorm:"default:0;" json:"is_open_render"` // 是否打开个性化渲染(1:开启,0:关闭)
|
||||
IsThousandFace *int64 `gorm:"default:0;" json:"is_thousand_face"` // 是否已经存在千人千面(1:存在,0:不存在)
|
||||
IsLowRendering *int64 `gorm:"default:0;" json:"is_low_rendering"` // 是否开启低渲染模型渲染
|
||||
|
|
|
@ -26,7 +26,7 @@ func (m *FsGuestModel) GenerateGuestID(ctx context.Context, AccessSecret uint64)
|
|||
return err
|
||||
}
|
||||
record.AuthKey = &authKey
|
||||
record.CreatedAt = &now
|
||||
record.Ctime = &now
|
||||
err = tx.Updates(record).Error
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
|
|
|
@ -22,8 +22,8 @@ type FsUser struct {
|
|||
Type *int64 `gorm:"default:0;" json:"type"` // 1普通餐厅 2连锁餐厅
|
||||
Status *int64 `gorm:"default:1;" json:"status"` // 1正常 0不正常
|
||||
IsDel *int64 `gorm:"default:0;" json:"is_del"` // 是否删除 1删除
|
||||
CreatedAt *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"created_at"` //
|
||||
UpdatedAt *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"updated_at"` //
|
||||
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
|
||||
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
|
||||
}
|
||||
type FsUserModel struct {
|
||||
db *gorm.DB
|
||||
|
|
|
@ -117,7 +117,7 @@ func (u *FsUserModel) RegisterByGoogleOAuth(ctx context.Context, token *auth.Reg
|
|||
if err == gorm.ErrRecordNotFound {
|
||||
createAt := time.Now().UTC()
|
||||
user.Email = &token.Email
|
||||
user.CreatedAt = &createAt
|
||||
user.Ctime = &createAt
|
||||
user.GoogleId = &googleId
|
||||
user.PasswordHash = &token.Password
|
||||
user.FirstName = &firstName
|
||||
|
@ -184,7 +184,7 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT
|
|||
|
||||
createAt := time.Now().UTC()
|
||||
user.Email = &token.Email
|
||||
user.CreatedAt = &createAt
|
||||
user.Ctime = &createAt
|
||||
user.PasswordHash = &token.Password
|
||||
user.FirstName = &FirstName
|
||||
user.LastName = &LastName
|
||||
|
|
Loading…
Reference in New Issue
Block a user