chores: refactor struct and structure project
This commit is contained in:
@@ -2,20 +2,20 @@ package staffrepository
|
||||
|
||||
import (
|
||||
"legalgo-BE-go/database"
|
||||
authdomain "legalgo-BE-go/internal/domain/auth"
|
||||
staffdomain "legalgo-BE-go/internal/domain/staff"
|
||||
)
|
||||
|
||||
type StaffRepository struct {
|
||||
DB *database.DB
|
||||
type impl struct {
|
||||
db *database.DB
|
||||
}
|
||||
|
||||
type StaffIntf interface {
|
||||
GetStaffByEmail(string) (*authdomain.Staff, error)
|
||||
GetStaffByID(string) (*authdomain.Staff, error)
|
||||
Create(*authdomain.Staff) (*authdomain.Staff, error)
|
||||
Update(authdomain.Staff) error
|
||||
type Staff interface {
|
||||
GetStaffByEmail(string) (*staffdomain.Staff, error)
|
||||
GetStaffByID(string) (*staffdomain.Staff, error)
|
||||
Create(staffdomain.Staff) error
|
||||
Update(staffdomain.Staff) error
|
||||
}
|
||||
|
||||
func New(db *database.DB) StaffIntf {
|
||||
return &StaffRepository{db}
|
||||
func New(db *database.DB) Staff {
|
||||
return &impl{db}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user