feat: category routes

This commit is contained in:
ericprd
2025-03-01 21:20:51 +08:00
parent acd80480dd
commit bdf6dd131e
19 changed files with 368 additions and 52 deletions
+21
View File
@@ -0,0 +1,21 @@
package categoryrepository
import (
"legalgo-BE-go/database"
categorydomain "legalgo-BE-go/internal/domain/category"
)
type accessor struct {
DB *database.DB
}
type Category interface {
Create(categorydomain.CategoryReq) error
GetAll() ([]categorydomain.Category, error)
}
func New(
db *database.DB,
) Category {
return &accessor{db}
}