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)
}
