数据实体模型
This commit is contained in:
@@ -2,38 +2,40 @@ package model
|
||||
|
||||
import "time"
|
||||
|
||||
// 用户表实体信息
|
||||
// User 用户表实体信息
|
||||
type User struct {
|
||||
Id int `json:"id"`
|
||||
AccountId string `json:"account_id"`
|
||||
Name string `json:"name"`
|
||||
RealName string `json:"real_name"`
|
||||
Sn string `json:"sn"`
|
||||
Gender string `json:"gender"`
|
||||
Email string `json:"email"`
|
||||
IdCardNumber string `json:"id_card_number"`
|
||||
Description string `json:"description"`
|
||||
TelephoneNumber string `json:"telephone_number"`
|
||||
Phone string `json:"phone"`
|
||||
Mobile string `json:"mobile"`
|
||||
EmployeeNumber string `json:"employee_number"`
|
||||
EmployeeType string `json:"employee_type"`
|
||||
Organize string `json:"organize"`
|
||||
SupporterCorpName string `json:"supporter_corp_name"`
|
||||
StartTime time.Time `json:"start_time"`
|
||||
EndTime time.Time `json:"end_time"`
|
||||
Password string `json:"password"`
|
||||
PasswordSha512 string `json:"password_sha512"`
|
||||
ChangePasswordFlag int `json:"change_password_flag"`
|
||||
PasswordExpiration string `json:"password_expiration"`
|
||||
Status string `json:"status"`
|
||||
UserExpiration string `json:"user_expiration"`
|
||||
GroupName string `json:"group_name"`
|
||||
Profile string `json:"profile"`
|
||||
CreateTime time.Time `json:"create_time"`
|
||||
UpdateTime time.Time `json:"update_time"`
|
||||
ID int64 `json:"id" gorm:"id"`
|
||||
AccountId string `json:"account_id" gorm:"account_id"`
|
||||
Name string `json:"name" gorm:"name"`
|
||||
RealName string `json:"real_name" gorm:"real_name"`
|
||||
Sn string `json:"sn" gorm:"sn"`
|
||||
Gender string `json:"gender" gorm:"gender"`
|
||||
Email string `json:"email" gorm:"email"`
|
||||
IdCardNumber string `json:"id_card_number" gorm:"id_card_number"`
|
||||
Description string `json:"description" gorm:"description"`
|
||||
TelephoneNumber string `json:"telephone_number" gorm:"telephone_number"`
|
||||
Phone string `json:"phone" gorm:"phone"`
|
||||
Mobile string `json:"mobile" gorm:"mobile"`
|
||||
EmployeeNumber string `json:"employee_number" gorm:"employee_number"`
|
||||
EmployeeType string `json:"employee_type" gorm:"employee_type"`
|
||||
Organize string `json:"organize" gorm:"organize"`
|
||||
SupporterCorpName string `json:"supporter_corp_name" gorm:"supporter_corp_name"`
|
||||
StartTime string `json:"start_time" gorm:"start_time"`
|
||||
EndTime string `json:"end_time" gorm:"end_time"`
|
||||
Password string `json:"password" gorm:"password"`
|
||||
PasswordSha512 string `json:"password_sha512" gorm:"password_sha512"`
|
||||
ChangePasswordFlag int8 `json:"change_password_flag" gorm:"change_password_flag"`
|
||||
PasswordExpiration time.Time `json:"password_expiration" gorm:"password_expiration"`
|
||||
Status string `json:"status" gorm:"status"`
|
||||
UserExpiration time.Time `json:"user_expiration" gorm:"user_expiration"`
|
||||
GroupName string `json:"group_name" gorm:"group_name"`
|
||||
Profile string `json:"profile" gorm:"profile"`
|
||||
CreateTime time.Time `json:"create_time" gorm:"create_time"`
|
||||
UpdateTime time.Time `json:"update_time" gorm:"update_time"`
|
||||
Unit string `json:"unit" gorm:"unit"`
|
||||
}
|
||||
|
||||
func (User) TableName() string {
|
||||
// TableName 表名称
|
||||
func (*User) TableName() string {
|
||||
return "user"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user