- 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.
19 lines
582 B
Go
19 lines
582 B
Go
package company
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/SamuelTariku/FortuneBet-Backend/internal/domain"
|
|
)
|
|
|
|
func (s *Service) UpdateCompanyStats(ctx context.Context) error {
|
|
return s.companyStore.UpdateCompanyStats(ctx);
|
|
}
|
|
|
|
func (s *Service) GetCompanyStatByID(ctx context.Context, companyID int64) ([]domain.CompanyStat, error) {
|
|
return s.companyStore.GetCompanyStatByID(ctx, companyID);
|
|
}
|
|
|
|
func (s *Service) GetCompanyStatsByInterval(ctx context.Context, filter domain.CompanyStatFilter) ([]domain.CompanyStat, error) {
|
|
return s.companyStore.GetCompanyStatsByInterval(ctx, filter)
|
|
} |