web 服务框架
This commit is contained in:
43
web/models/user.gen.go
Normal file
43
web/models/user.gen.go
Normal file
@@ -0,0 +1,43 @@
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
const TableNameUser = "user"
|
||||
|
||||
// User mapped from table <user>
|
||||
type User struct {
|
||||
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
|
||||
AdminID int32 `gorm:"column:admin_id" json:"admin_id"`
|
||||
Phone string `gorm:"column:phone;not null" json:"phone"`
|
||||
Username string `gorm:"column:username" json:"username"`
|
||||
Email string `gorm:"column:email" json:"email"`
|
||||
Password string `gorm:"column:password" json:"password"`
|
||||
Name string `gorm:"column:name" json:"name"`
|
||||
Avatar string `gorm:"column:avatar" json:"avatar"`
|
||||
Status int32 `gorm:"column:status;not null;default:1" json:"status"`
|
||||
Balance float64 `gorm:"column:balance;not null" json:"balance"`
|
||||
IDType int32 `gorm:"column:id_type;not null" json:"id_type"`
|
||||
IDNo string `gorm:"column:id_no" json:"id_no"`
|
||||
IDToken string `gorm:"column:id_token" json:"id_token"`
|
||||
ContactQq string `gorm:"column:contact_qq" json:"contact_qq"`
|
||||
ContactWechat string `gorm:"column:contact_wechat" json:"contact_wechat"`
|
||||
LastLogin time.Time `gorm:"column:last_login" json:"last_login"`
|
||||
LastLoginAddr string `gorm:"column:last_login_addr" json:"last_login_addr"`
|
||||
LastLoginAgent string `gorm:"column:last_login_agent" json:"last_login_agent"`
|
||||
CreatedAt time.Time `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
|
||||
}
|
||||
|
||||
// TableName User's table name
|
||||
func (*User) TableName() string {
|
||||
return TableNameUser
|
||||
}
|
||||
Reference in New Issue
Block a user