Yimaru-BackEnd/internal/services/event/port.go
Samuel Tariku 0ffba57ec5 feat: Refactor report generation and management
- Removed detailed event routes from the API.
- Added new report request routes for creating and fetching report requests.
- Introduced new domain models for report requests, including metadata and status handling.
- Implemented report request processing logic, including CSV generation for event interval reports.
- Enhanced company statistics handling with new domain models and service methods.
- Updated repository interfaces and implementations to support new report functionalities.
- Added error handling and logging for report file operations and notifications.
2025-10-28 00:51:52 +03:00

32 lines
1.6 KiB
Go

package event
import (
"context"
"github.com/SamuelTariku/FortuneBet-Backend/internal/domain"
)
type EventStore interface {
// FetchLiveEvents(ctx context.Context) error
FetchUpcomingEvents(ctx context.Context) error
GetAllEvents(ctx context.Context, filter domain.EventFilter) ([]domain.BaseEvent, int64, error)
GetEventByID(ctx context.Context, ID int64) (domain.BaseEvent, error)
// GetAndStoreMatchResult(ctx context.Context, eventID int64) error
UpdateFinalScore(ctx context.Context, eventID int64, fullScore string, status domain.EventStatus) error
UpdateEventStatus(ctx context.Context, eventID int64, status domain.EventStatus) error
IsEventMonitored(ctx context.Context, eventID int64) (bool, error)
UpdateEventMonitored(ctx context.Context, eventID int64, IsMonitored bool) error
GetSportAndLeagueIDs(ctx context.Context, eventID int64) ([]int64, error)
// Event Settings Views
GetEventsWithSettings(ctx context.Context, companyID int64, filter domain.EventFilter) ([]domain.EventWithSettings, int64, error)
GetEventWithSettingByID(ctx context.Context, ID int64, companyID int64) (domain.EventWithSettings, error)
UpdateTenantEventSettings(ctx context.Context, event domain.UpdateTenantEventSettings) error
UpdateGlobalEventSettings(ctx context.Context, event domain.UpdateGlobalEventSettings) error
// Stats
GetTotalEventStats(ctx context.Context, filter domain.EventStatsFilter) (domain.EventStats, error)
GetTotalEventStatsByInterval(ctx context.Context, filter domain.EventStatsByIntervalFilter) ([]domain.EventStatsByInterval, error)
UpdateEventBetStats(ctx context.Context) error
}