chores: refactor struct and structure project

This commit is contained in:
ericprd
2025-03-05 21:21:44 +08:00
parent 13a8481f22
commit 567e0e32ca
103 changed files with 1125 additions and 731 deletions
+10 -10
View File
@@ -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}
}