25 lines
499 B
Go
Raw Normal View History

2025-03-01 21:20:51 +08:00
package categorysvc
import (
categoryrepository "legalgo-BE-go/internal/accessor/category"
categorydomain "legalgo-BE-go/internal/domain/category"
)
type impl struct {
categoryRepo categoryrepository.Category
}
type Category interface {
Create(categorydomain.CategoryReq) error
GetAll() ([]categorydomain.Category, error)
Update(string, categorydomain.CategoryReq) error
2025-03-01 21:20:51 +08:00
}
func New(
categoryRepo categoryrepository.Category,
) Category {
return &impl{
categoryRepo: categoryRepo,
}
}