Files

21 lines
910 B
Go

package repository
import "cloudnest/internal/domain/auth/entity"
// UserRepository defines the interface for user data access operations.
// UserRepository 定义了用户数据访问操作的接口。
//
// This interface follows the Dependency Inversion Principle (DIP),
// where the application layer depends on this abstraction rather than concrete implementations.
//
// 此接口遵循依赖倒置原则(DIP),应用层依赖于这个抽象而非具体实现。
type UserRepository interface {
FindByUsername(username string) (*entity.User, error)
FindByUserCode(userCode string) (*entity.User, error)
FindByEmail(email string) (*entity.User, error)
Create(user *entity.User) error
FindByID(id uint) (*entity.User, error)
UpdateStorageUsed(userCode string, size int64) error
UpdateProfile(userCode, email, phone, nickname string) error
UpdatePassword(userCode, newPassword string) error
}