- Updated league handling to ensure valid page size checks and improved error handling for sport ID parsing. - Introduced new endpoint to update global league settings with comprehensive validation and error logging. - Refactored odds settings management, including saving, removing, and updating odds settings with enhanced validation. - Added tenant slug retrieval by token, ensuring proper user and company validation. - Improved middleware to check for active company status and adjusted route permissions for various endpoints. - Added SQL script to fix auto-increment desynchronization across multiple tables.
25 lines
1.3 KiB
Go
25 lines
1.3 KiB
Go
package event
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/SamuelTariku/FortuneBet-Backend/internal/domain"
|
|
)
|
|
|
|
type Service 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
|
|
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
|
|
GetSportAndLeagueIDs(ctx context.Context, eventID int64) ([]int64, error)
|
|
}
|