Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUserDuplicateEmail = errors.New("邮箱冲突") ErrUserNotFound = gorm.ErrRecordNotFound )
Functions ¶
Types ¶
type User ¶
type User struct { Id int64 `gorm:"primaryKey,autoIncrement"` // 全部用户唯一 Email string `gorm:"unique"` Password string // 往这面加 Birthday string NickName string // 创建时间,毫秒数 Ctime int64 // 更新时间,毫秒数 Utime int64 }
User 直接对应数据库表结构 entity, model, PO(persistent object)
type UserDAO ¶
type UserDAO struct {
// contains filtered or unexported fields
}
func NewUserDAO ¶
func (*UserDAO) FindByEmail ¶
Click to show internal directories.
Click to hide internal directories.