首次提交:初始化项目代码
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user