forked from ebhomengo/niki
1
0
Fork 0
niki/service/admin/kind_box_req/service.go

33 lines
915 B
Go
Raw Normal View History

2023-12-25 17:08:19 +00:00
package adminkindboxreqservice
import (
"context"
2023-12-25 17:08:19 +00:00
entity "git.gocasts.ir/ebhomengo/niki/entity"
)
type Repository interface {
AddKindBoxReq(ctx context.Context, kindBoxReq entity.KindBoxReq) (entity.KindBoxReq, error)
2023-12-25 17:08:19 +00:00
UpdateKindBoxReq(ctx context.Context, kindBoxReqID uint, kindBoxReq entity.KindBoxReq) (entity.KindBoxReq, error)
// TODO: can benefactor cancel its request ?
DeleteKindBoxReq(ctx context.Context, kindBoxReqID uint) error
GetAllKindBoxReq(ctx context.Context) ([]entity.KindBoxReq, error)
2023-12-25 17:08:19 +00:00
GetKindBoxReq(ctx context.Context, kindBoxReqID uint) (entity.KindBoxReq, error)
}
// TODO: check validation.
2023-12-26 20:01:45 +00:00
// type BenefactorService interface {
// IsBenefactorExist(ctx context.Context, benefactorID uint) (bool, error)
// }
type Service struct {
2023-12-26 20:01:45 +00:00
repo Repository
// benefactorService BenefactorService
}
func New(repository Repository) Service {
return Service{
repo: repository,
}
}