forked from ebhomengo/niki
31 lines
789 B
Go
31 lines
789 B
Go
package adminkindboxservice
|
|
|
|
import (
|
|
"context"
|
|
|
|
entity "git.gocasts.ir/ebhomengo/niki/entity"
|
|
)
|
|
|
|
type Repository interface {
|
|
AddKindBox(ctx context.Context, kindBox entity.KindBox) (entity.KindBox, error)
|
|
//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,
|
|
}
|
|
}
|