package service

import (
	"github.com/zs/InsightReply/internal/model"
	"github.com/zs/InsightReply/internal/repository"
)

type CompetitorMonitorService struct {
	repo *repository.CompetitorMonitorRepository
}

func NewCompetitorMonitorService(repo *repository.CompetitorMonitorRepository) *CompetitorMonitorService {
	return &CompetitorMonitorService{repo: repo}
}

func (s *CompetitorMonitorService) ListMonitors(userID string) ([]model.CompetitorMonitor, error) {
	return s.repo.ListByUserID(userID)
}

func (s *CompetitorMonitorService) CreateMonitor(monitor *model.CompetitorMonitor) error {
	return s.repo.Create(monitor)
}

func (s *CompetitorMonitorService) DeleteMonitor(id string, userID string) error {
	return s.repo.Delete(id, userID)
}
