niki/service/admin/kind_box/service.go

31 lines
789 B
Go
Raw Normal View History

2023-12-25 17:08:19 +00:00
package adminkindboxservice
import (
"context"
2023-12-25 17:08:19 +00:00
entity "git.gocasts.ir/ebhomengo/niki/entity"
)
type Repository interface {
AddKindBox(ctx context.Context, kindBox entity.KindBox) (entity.KindBox, error)
2024-01-23 07:39:58 +00:00
//UpdateKindBox(ctx context.Context, kindBoxID uint, kindBoxInput entity.KindBox) (entity.KindBox, error)
//DeleteKindBox(ctx context.Context, kindBoxID uint) error
//GetAllKindBox(ctx context.Context) ([]entity.KindBox, error)
//GetKindBox(ctx context.Context, kindBox uint) (entity.KindBox, error)
}
type Service struct {
repo Repository
}
// TODO: check validation.
// type BenefactorService interface {
// IsBenefactorExist(ctx context.Context, benefactorID uint) (bool, error)
// }
func New(repository Repository) Service {
return Service{
repo: repository,
}
}