Add License
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/services/branch"
|
||||
service "furtuna-be/internal/services/license"
|
||||
"furtuna-be/internal/services/order"
|
||||
"furtuna-be/internal/services/oss"
|
||||
"furtuna-be/internal/services/partner"
|
||||
@@ -32,6 +33,7 @@ type ServiceManagerImpl struct {
|
||||
OSSSvc OSSService
|
||||
PartnerSvc Partner
|
||||
SiteSvc Site
|
||||
LicenseSvc License
|
||||
}
|
||||
|
||||
func NewServiceManagerImpl(cfg *config.Config, repo *repository.RepoManagerImpl) *ServiceManagerImpl {
|
||||
@@ -46,7 +48,8 @@ func NewServiceManagerImpl(cfg *config.Config, repo *repository.RepoManagerImpl)
|
||||
OSSSvc: oss.NewOSSService(repo.OSS),
|
||||
PartnerSvc: partner.NewPartnerService(
|
||||
repo.Partner, users.NewUserService(repo.User, repo.Branch), repo.Trx, repo.Wallet),
|
||||
SiteSvc: site.NewSiteService(repo.Site),
|
||||
SiteSvc: site.NewSiteService(repo.Site),
|
||||
LicenseSvc: service.NewLicenseService(repo.License),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,3 +126,10 @@ type Site interface {
|
||||
GetAll(ctx context.Context, search entity.SiteSearch) ([]*entity.Site, int, error)
|
||||
Delete(ctx mycontext.Context, id int64) error
|
||||
}
|
||||
|
||||
type License interface {
|
||||
Create(ctx mycontext.Context, licenseReq *entity.License) (*entity.License, error)
|
||||
Update(ctx mycontext.Context, id string, licenseReq *entity.License) (*entity.License, error)
|
||||
GetByID(ctx context.Context, id string) (*entity.License, error)
|
||||
GetAll(ctx context.Context, limit, offset int) ([]*entity.License, int64, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user