This commit is contained in:
landaiqing
2024-07-31 13:35:43 +08:00
parent 57db496aa3
commit ff0fddd5c3
10 changed files with 341 additions and 0 deletions

26
models/user_basic.go Normal file
View File

@@ -0,0 +1,26 @@
package models
import (
"gorm.io/gorm"
"time"
)
type UserBasic struct {
gorm.Model
Username string
Password string
Phone string `valid:"matches(^1[3-9]{1}\\d{9}$)"`
Email string `valid:"email"`
Identity string
ClientIp string
ClientPort string
LoginTime *time.Time `gorm:"default:null"`
HeartbeatTime *time.Time `gorm:"default:null"`
LoginOutTime *time.Time `gorm:"column:login_out_time" json:"login_out_time"`
IsLogout bool
DeviceInfo string
}
func (table *UserBasic) TableName() string {
return "user_basic"
}