Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Task ¶
type Task struct {
ID uint `gorm:"primary_key"`
OpenID string `gorm:"size:255;sql:index"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time `sql:"index"`
}
Task 任务
type User ¶
type User struct {
ID uint `gorm:"primary_key"`
Email string `gorm:"type:varchar(100);unique_index"` // `type` set sql type, `unique_index` will create unique index for this column
OpenID string `gorm:"size:255;sql:index"`
Invited bool
Registered bool
Subscribed bool `gorm:"default:true"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time `sql:"index"`
}
User has and belongs to many languages, use `user_languages` as join table
func (*User) GetUserByEmail ¶
GetUserByEmail 通过openID获取用户信息 如果没有的话进行初始化
func (*User) GetUserByOpenID ¶
GetUserByOpenID 通过openID获取用户信息 如果没有的话进行初始化
Click to show internal directories.
Click to hide internal directories.