generated from NSObjects/go-template
/
user.gen.go
37 lines (31 loc) · 1.64 KB
/
user.gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// 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 model
import (
"time"
"gorm.io/gorm"
)
const TableNameUser = "user"
// User mapped from table <user>
type User struct {
ID int64 `gorm:"column:id;type:bigint unsigned;primaryKey;autoIncrement:true" json:"id"`
Name *string `gorm:"column:name;type:longtext" json:"name"`
Phone *string `gorm:"column:phone;type:longtext" json:"phone"`
Status *int64 `gorm:"column:status;type:bigint" json:"status"`
Account *string `gorm:"column:account;type:longtext" json:"account"`
Password *string `gorm:"column:password;type:longtext" json:"password"`
DepartmentID *int64 `gorm:"column:department_id;type:bigint unsigned" json:"department_id"`
RoleID *int64 `gorm:"column:role_id;type:bigint unsigned" json:"role_id"`
Sex *int64 `gorm:"column:sex;type:bigint" json:"sex"`
Posts *string `gorm:"column:posts;type:longtext" json:"posts"`
Avatar *string `gorm:"column:avatar;type:longtext" json:"avatar"`
Email *string `gorm:"column:email;type:longtext" json:"email"`
CreatedAt *time.Time `gorm:"column:created_at;type:datetime(3)" json:"created_at"`
UpdatedAt *time.Time `gorm:"column:updated_at;type:datetime(3)" json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);index:idx_user_deleted_at,priority:1" json:"deleted_at"`
}
// TableName User's table name
func (*User) TableName() string {
return TableNameUser
}