view data fixes
This commit is contained in:
@@ -1,31 +1,86 @@
|
||||
import type { DriverViewData } from './DriverViewData';
|
||||
import type { RaceViewData } from './RaceViewData';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
|
||||
export interface LeagueViewData {
|
||||
export interface LiveRaceData {
|
||||
id: string;
|
||||
name: string;
|
||||
game: string;
|
||||
tier: 'premium' | 'standard' | 'starter';
|
||||
season: string;
|
||||
description: string;
|
||||
drivers: number;
|
||||
races: number;
|
||||
completedRaces: number;
|
||||
totalImpressions: number;
|
||||
avgViewsPerRace: number;
|
||||
engagement: number;
|
||||
rating: number;
|
||||
seasonStatus: 'active' | 'upcoming' | 'completed';
|
||||
seasonDates: { start: string; end: string };
|
||||
nextRace?: { name: string; date: string };
|
||||
sponsorSlots: {
|
||||
main: { available: boolean; price: number; benefits: string[] };
|
||||
secondary: { available: number; total: number; price: number; benefits: string[] };
|
||||
};
|
||||
date: string;
|
||||
registeredCount: number;
|
||||
strengthOfField: number;
|
||||
}
|
||||
|
||||
export interface LeagueDetailViewData {
|
||||
league: LeagueViewData;
|
||||
drivers: (DriverViewData & { impressions: number })[];
|
||||
races: (RaceViewData & { views: number })[];
|
||||
export interface LeagueInfoData {
|
||||
name: string;
|
||||
description: string;
|
||||
membersCount: number;
|
||||
racesCount: number;
|
||||
avgSOF: number | null;
|
||||
structure: string;
|
||||
scoring: string;
|
||||
createdAt: string;
|
||||
discordUrl?: string;
|
||||
youtubeUrl?: string;
|
||||
websiteUrl?: string;
|
||||
}
|
||||
|
||||
export interface DriverSummaryData {
|
||||
driverId: string;
|
||||
driverName: string;
|
||||
avatarUrl: string | null;
|
||||
rating: number | null;
|
||||
rank: number | null;
|
||||
roleBadgeText: string;
|
||||
roleBadgeClasses: string;
|
||||
profileUrl: string;
|
||||
}
|
||||
|
||||
export interface SponsorInfo {
|
||||
id: string;
|
||||
name: string;
|
||||
tier: string;
|
||||
logoUrl?: string;
|
||||
websiteUrl?: string;
|
||||
tagline?: string;
|
||||
}
|
||||
|
||||
export interface NextRaceInfo {
|
||||
id: string;
|
||||
name: string;
|
||||
date: string;
|
||||
track: string;
|
||||
car: string;
|
||||
}
|
||||
|
||||
export interface SeasonProgress {
|
||||
completedRaces: number;
|
||||
totalRaces: number;
|
||||
percentage: number;
|
||||
}
|
||||
|
||||
export interface RecentResult {
|
||||
raceId: string;
|
||||
raceName: string;
|
||||
position: number;
|
||||
points: number;
|
||||
finishedAt: string;
|
||||
}
|
||||
|
||||
export interface LeagueDetailViewData extends ViewData {
|
||||
leagueId: string;
|
||||
name: string;
|
||||
description: string;
|
||||
logoUrl?: string;
|
||||
info: LeagueInfoData;
|
||||
runningRaces: LiveRaceData[];
|
||||
sponsors: SponsorInfo[];
|
||||
ownerSummary: DriverSummaryData | null;
|
||||
adminSummaries: DriverSummaryData[];
|
||||
stewardSummaries: DriverSummaryData[];
|
||||
memberSummaries: DriverSummaryData[];
|
||||
sponsorInsights: any | null;
|
||||
nextRace?: NextRaceInfo;
|
||||
seasonProgress: SeasonProgress;
|
||||
recentResults: RecentResult[];
|
||||
walletBalance: number;
|
||||
pendingProtestsCount: number;
|
||||
pendingJoinRequestsCount: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user