24 lines
477 B
Go
Raw Normal View History

2025-02-24 16:48:20 +08:00
package userrepository
import (
"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)
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}
}