Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIM ¶
type AIM struct { ID int64 `gorm:"column:id;primary_key"` // unique id of the ai content, server as the primary key Username string `gorm:"column:username"` // author of the ai content PostID string `gorm:"column:postID;primary_key"` // post of the ai content Content string `gorm:"column:content"` // content of the ai content }
type PostM ¶
type PostM struct { ID int64 `gorm:"column:id;primary_key"` // unique id for the post, server as the primary key Username string `gorm:"column:username"` // author of the post PostID string `gorm:"column:postID"` // unique id for the post, used as a user-friendly ID Title string `gorm:"column:title"` // title of the post Content string `gorm:"column:content"` // content of the post CreatedAt time.Time `gorm:"column:createdAt"` // time when the post was created UpdatedAt time.Time `gorm:"column:updatedAt"` // time when the post was updated }
type UserM ¶
type UserM struct { ID int64 `gorm:"column:id;primary_key"` // unique id for the user, server as the primary key PostCount int64 `gorm:"column:postcount"` // number of posts the user has Username string `gorm:"column:username"` // username of the user Password string `gorm:"column:password"` // password of the user Nickname string `gorm:"column:nickname"` // nickname of the user Email string `gorm:"column:email"` // email of the user Gender string `gorm:"column:gender"` // gender of the user Phone string `gorm:"column:phone"` // phone number of the user QQ string `gorm:"column:qq"` // qq number of the user CreatedAt time.Time `gorm:"column:createdAt"` // time when the user was created UpdatedAt time.Time `gorm:"column:updatedAt"` // time when the user was updated }
func (*UserM) BeforeCreate ¶
BeforeCreate will encrypt the user password before creating the user
Click to show internal directories.
Click to hide internal directories.