Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewData, NewUserRepo, ProvideDB, ProvideCache, ProvideTracerName)
Functions ¶
func NewUserRepo ¶
NewUserRepo 创建 UserRepo 实现(返回 biz.UserRepo 接口)。
func ProvideTracerName ¶
func ProvideTracerName() string
Types ¶
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
Data 数据层聚合结构体 — 封装所有持久化和中间件资源。
type UserPO ¶
type UserPO struct {
gorm.Model
Username string `gorm:"column:username;type:varchar(32);uniqueIndex:idx_users_username,where:deleted_at IS NULL;not null"`
Email string `gorm:"column:email;type:varchar(255);uniqueIndex:idx_users_email,where:deleted_at IS NULL;not null"`
Password string `gorm:"column:password;type:varchar(255);not null" json:"-"`
Avatar string `gorm:"column:avatar;type:varchar(512);default:''"`
Bio string `gorm:"column:bio;type:text;default:''"`
Status int8 `gorm:"column:status;type:smallint;default:0"`
Role string `gorm:"column:role;type:varchar(16);default:'reader'"`
}
Click to show internal directories.
Click to hide internal directories.