chores: refactor struct and structure project
This commit is contained in:
@@ -2,6 +2,6 @@ package subscribeplansvc
|
||||
|
||||
import subscribeplandomain "legalgo-BE-go/internal/domain/subscribe_plan"
|
||||
|
||||
func (sb *SubsPlanSvc) CreatePlan(spec subscribeplandomain.SubscribePlanReq) error {
|
||||
func (sb *impl) CreatePlan(spec subscribeplandomain.SubscribePlanReq) error {
|
||||
return sb.subsAccs.Create(spec)
|
||||
}
|
||||
|
||||
@@ -4,6 +4,6 @@ import (
|
||||
subscribeplandomain "legalgo-BE-go/internal/domain/subscribe_plan"
|
||||
)
|
||||
|
||||
func (s *SubsPlanSvc) GetAllPlan() ([]subscribeplandomain.SubscribePlan, error) {
|
||||
func (s *impl) GetAllPlan() ([]subscribeplandomain.SubscribePlan, error) {
|
||||
return s.subsAccs.GetAll()
|
||||
}
|
||||
|
||||
@@ -5,17 +5,17 @@ import (
|
||||
subscribeplandomain "legalgo-BE-go/internal/domain/subscribe_plan"
|
||||
)
|
||||
|
||||
type SubsPlanSvc struct {
|
||||
type impl struct {
|
||||
subsAccs subscribeplanrepository.SubsPlanIntf
|
||||
}
|
||||
|
||||
type SubsPlanIntf interface {
|
||||
type SubscribePlan interface {
|
||||
CreatePlan(subscribeplandomain.SubscribePlanReq) error
|
||||
GetAllPlan() ([]subscribeplandomain.SubscribePlan, error)
|
||||
}
|
||||
|
||||
func New(
|
||||
subsAccs subscribeplanrepository.SubsPlanIntf,
|
||||
) SubsPlanIntf {
|
||||
return &SubsPlanSvc{subsAccs}
|
||||
) SubscribePlan {
|
||||
return &impl{subsAccs}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user