2023-06-19 01:53:35 +00:00
|
|
|
package gmodel
|
2023-06-16 11:04:13 +00:00
|
|
|
|
2023-06-16 11:29:48 +00:00
|
|
|
import (
|
|
|
|
"gorm.io/gorm"
|
2023-09-26 05:23:49 +00:00
|
|
|
"time"
|
2023-06-16 11:29:48 +00:00
|
|
|
)
|
2023-06-16 11:04:13 +00:00
|
|
|
|
2023-06-16 11:29:48 +00:00
|
|
|
// fs_user 用户表
|
2023-06-16 11:04:13 +00:00
|
|
|
type FsUser struct {
|
2023-09-26 05:31:42 +00:00
|
|
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // ID
|
|
|
|
FaceId *string `gorm:"default:'0';" json:"face_id"` // facebook的userid
|
|
|
|
GoogleId *string `gorm:"default:'0';" json:"google_id"` // google的sub
|
|
|
|
FirstName *string `gorm:"default:'';" json:"first_name"` // FirstName
|
|
|
|
LastName *string `gorm:"default:'';" json:"last_name"` // LastName
|
|
|
|
Username *string `gorm:"index;default:'';" json:"username"` //
|
|
|
|
Company *string `gorm:"default:'';" json:"company"` // 公司名称
|
2023-09-26 09:16:10 +00:00
|
|
|
Mobile *string `gorm:"default:'';" json:"mobile"` //
|
2023-09-26 05:31:42 +00:00
|
|
|
PasswordHash *string `gorm:"default:'';" json:"password_hash"` //
|
|
|
|
VerificationToken *string `gorm:"default:'';" json:"verification_token"` //
|
|
|
|
PasswordResetToken *string `gorm:"default:'';" json:"password_reset_token"` //
|
|
|
|
Email *string `gorm:"unique_key;default:'';" json:"email"` // 邮箱
|
|
|
|
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删除
|
|
|
|
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"` //
|
2023-06-16 11:04:13 +00:00
|
|
|
}
|
2023-07-20 02:13:18 +00:00
|
|
|
type FsUserModel struct {
|
|
|
|
db *gorm.DB
|
|
|
|
name string
|
|
|
|
}
|
2023-06-16 11:04:13 +00:00
|
|
|
|
2023-07-20 02:13:18 +00:00
|
|
|
func NewFsUserModel(db *gorm.DB) *FsUserModel { return &FsUserModel{db: db, name: "fs_user"} }
|