2025-02-24 16:48:20 +08:00
|
|
|
package userrepository
|
|
|
|
|
|
|
|
|
|
import (
|
2025-02-27 07:25:25 +08:00
|
|
|
"legalgo-BE-go/database"
|
|
|
|
|
authdomain "legalgo-BE-go/internal/domain/auth"
|
2025-02-24 16:48:20 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type UserRepository struct {
|
|
|
|
|
DB *database.DB
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type UserIntf interface {
|
2025-02-24 19:47:40 +08:00
|
|
|
GetUserByEmail(string) (*authdomain.User, error)
|
2025-02-27 18:59:58 +08:00
|
|
|
GetUserByID(string) (*authdomain.UserProfile, error)
|
2025-02-28 12:18:47 +08:00
|
|
|
GetUserProfile(string) (*authdomain.UserProfile, error)
|
2025-02-24 16:48:20 +08:00
|
|
|
CreateUser(*authdomain.User) (*authdomain.User, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func New(
|
|
|
|
|
db *database.DB,
|
|
|
|
|
) UserIntf {
|
|
|
|
|
return &UserRepository{db}
|
|
|
|
|
}
|