Upstream sync
This commit is contained in:
31
domain/service/plan.go
Normal file
31
domain/service/plan.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"bitbucket.org/nemt/nemt-portal-api/domain/entity"
|
||||
)
|
||||
|
||||
type planService struct {
|
||||
svc *Service
|
||||
}
|
||||
|
||||
func newPlanService(svc *Service) *planService {
|
||||
return &planService{
|
||||
svc: svc,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *planService) GetByAlphaPrefix(alphaPrefix string) (entity.Plan, error) {
|
||||
return s.svc.db.Plans().GetByAlphaPrefix(alphaPrefix)
|
||||
}
|
||||
|
||||
func (s *planService) GetByUUID(planUUID string) ([]entity.Plan, error) {
|
||||
return s.svc.db.Plans().GetByUUID(planUUID)
|
||||
}
|
||||
|
||||
func (s *planService) GetByID(planID int64) ([]entity.Plan, error) {
|
||||
return s.svc.db.Plans().GetByID(planID)
|
||||
}
|
||||
|
||||
func (s *planService) GetByPrefixUUID(prefixUUID string) (entity.Plan, error) {
|
||||
return s.svc.db.Plans().GetByPrefixUUID(prefixUUID)
|
||||
}
|
||||
Reference in New Issue
Block a user