init
This commit is contained in:
26
models/user_basic.go
Normal file
26
models/user_basic.go
Normal 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"
|
||||
}
|
Reference in New Issue
Block a user