mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 07:37:52 +08:00
修改数据库表
This commit is contained in:
@@ -10,21 +10,21 @@ import (
|
||||
"github.com/xlzd/gotp"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
Id int `json:"id" xorm:"pk autoincr not null"`
|
||||
Username string `json:"username" storm:"not null unique"`
|
||||
Nickname string `json:"nickname"`
|
||||
Email string `json:"email"`
|
||||
// Password string `json:"password"`
|
||||
PinCode string `json:"pin_code"`
|
||||
OtpSecret string `json:"otp_secret"`
|
||||
DisableOtp bool `json:"disable_otp"` // 禁用otp
|
||||
Groups []string `json:"groups"`
|
||||
Status int8 `json:"status"` // 1正常
|
||||
SendEmail bool `json:"send_email"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
// type User struct {
|
||||
// Id int `json:"id" xorm:"pk autoincr not null"`
|
||||
// Username string `json:"username" storm:"not null unique"`
|
||||
// Nickname string `json:"nickname"`
|
||||
// Email string `json:"email"`
|
||||
// // Password string `json:"password"`
|
||||
// PinCode string `json:"pin_code"`
|
||||
// OtpSecret string `json:"otp_secret"`
|
||||
// DisableOtp bool `json:"disable_otp"` // 禁用otp
|
||||
// Groups []string `json:"groups"`
|
||||
// Status int8 `json:"status"` // 1正常
|
||||
// SendEmail bool `json:"send_email"`
|
||||
// CreatedAt time.Time `json:"created_at"`
|
||||
// UpdatedAt time.Time `json:"updated_at"`
|
||||
// }
|
||||
|
||||
func SetUser(v *User) error {
|
||||
var err error
|
||||
|
Reference in New Issue
Block a user