22 lines
366 B
Go
22 lines
366 B
Go
package userrepository
|
|
|
|
import (
|
|
"legalgo-BE-go/database"
|
|
authdomain "legalgo-BE-go/internal/domain/auth"
|
|
)
|
|
|
|
type UserRepository struct {
|
|
DB *database.DB
|
|
}
|
|
|
|
type UserIntf interface {
|
|
GetUserByEmail(string) (*authdomain.User, error)
|
|
CreateUser(*authdomain.User) (*authdomain.User, error)
|
|
}
|
|
|
|
func New(
|
|
db *database.DB,
|
|
) UserIntf {
|
|
return &UserRepository{db}
|
|
}
|