2024-01-02 14:04:16 +00:00
|
|
|
package benefactorkindboxreqservice
|
2023-12-25 17:08:19 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
entity "git.gocasts.ir/ebhomengo/niki/entity"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Repository interface {
|
|
|
|
AddKindBoxReq(ctx context.Context, kindBoxReq entity.KindBoxReq) (entity.KindBoxReq, error)
|
2024-01-16 16:13:06 +00:00
|
|
|
// UpdateKindBoxReq(ctx context.Context, kindBoxReqID uint, kindBoxReq entity.KindBoxReq) (entity.KindBoxReq, error)
|
2023-12-25 17:08:19 +00:00
|
|
|
// TODO: can benefactor cancel its request ?
|
2024-01-16 16:13:06 +00:00
|
|
|
// DeleteKindBoxReq(ctx context.Context, kindBoxReqID uint) error
|
|
|
|
// GetAllKindBoxReq(ctx context.Context, benefactorID uint) ([]entity.KindBoxReq, error)
|
|
|
|
// GetKindBoxReq(ctx context.Context, kindBoxReqID uint) (entity.KindBoxReq, error)
|
2023-12-25 17:08:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Service struct {
|
|
|
|
repo Repository
|
|
|
|
}
|
|
|
|
|
|
|
|
func New(repository Repository) Service {
|
|
|
|
return Service{
|
|
|
|
repo: repository,
|
|
|
|
}
|
|
|
|
}
|