6b3b0360e7
Deliver the demo-ready feature set and seed data so the live site can be presented end to end: - Winner archive: ArchivedWinner domain, admin CRUD endpoints/view/manager and public archive surface, backed by AddArchivedWinners migration. - Host presentation: host image upload and artist name on SiteSettings with public image endpoint and supporting migrations. - Clip submissions: idempotent table-ensure migration plus current-season demo clips for review workflows. - Demo seed data: sponsors, share links and 2025 archived winners, with a guarded RemoveDemoSeasons cleanup; all seeds guard against real data. - EnsureRuntimeSchemaParity migration to align runtime schema defensively. - Admin/home UI refinements; remove unused team role permissions modal and dead share-quick-links code. All seed and schema migrations are idempotent (IF NOT EXISTS / ON CONFLICT) and skip when real season data is present. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
205 lines
5.4 KiB
C#
205 lines
5.4 KiB
C#
namespace Backend.Contracts;
|
|
|
|
public sealed record AdminSeasonListItemDto(
|
|
int Id,
|
|
int Year,
|
|
string Name,
|
|
string CurrentPhase,
|
|
bool IsCurrent,
|
|
bool IsDemo,
|
|
int CategoryCount,
|
|
DateTimeOffset? WinnersPublishedAt,
|
|
string? WinnersPublishedByTwitchId);
|
|
|
|
public sealed record AdminCategoryItemDto(
|
|
int Id,
|
|
string GroupName,
|
|
string Name,
|
|
string Slug,
|
|
string Description,
|
|
int SortOrder,
|
|
int MaxNomineesPerUser,
|
|
int? ViewerRangeMin,
|
|
int? ViewerRangeMax,
|
|
int CandidateCount);
|
|
|
|
public sealed record AdminSubcategoryTemplateDto(
|
|
string Name,
|
|
string Slug,
|
|
int SortOrder,
|
|
int? ViewerRangeMin,
|
|
int? ViewerRangeMax);
|
|
|
|
public sealed record AdminCandidateItemDto(
|
|
int Id,
|
|
int CategoryId,
|
|
int? StreamerIdentityId,
|
|
string DisplayName,
|
|
string ChannelSlug,
|
|
string Platform,
|
|
int? AvgViewers,
|
|
int Votes,
|
|
int NominationTally,
|
|
string AcceptanceStatus,
|
|
string? AcceptanceNote,
|
|
string? ClipCompilationUrl,
|
|
string? ClipCompilationTitle,
|
|
string? ClipCompilationPlatform,
|
|
string ClipEmbedStatus);
|
|
|
|
public sealed record AdminAwardResultItemDto(
|
|
int Id,
|
|
int CategoryId,
|
|
string CategoryName,
|
|
int CandidateId,
|
|
int? StreamerIdentityId,
|
|
string CandidateDisplayName,
|
|
string CandidateChannelSlug,
|
|
string CandidatePlatform);
|
|
|
|
public sealed record AdminVotingWorkspaceSummaryDto(
|
|
int TotalVotes,
|
|
int TotalBallots,
|
|
int TotalSubcategories,
|
|
int VotedSubcategories,
|
|
int ReadySubcategories,
|
|
int ProblemSubcategories,
|
|
int WinnerSetSubcategories);
|
|
|
|
public sealed record AdminVotingCandidateRankDto(
|
|
int CandidateId,
|
|
string DisplayName,
|
|
string ChannelSlug,
|
|
string Platform,
|
|
int Votes,
|
|
int VoteSharePercent,
|
|
int NominationTally,
|
|
bool HasClip,
|
|
string ClipEmbedStatus,
|
|
bool HasWinnerConflict,
|
|
bool IsCurrentWinner,
|
|
bool IsAccepted,
|
|
bool IsTopTie);
|
|
|
|
public sealed record AdminVotingCategoryWorkspaceItemDto(
|
|
int CategoryId,
|
|
string GroupName,
|
|
string CategoryName,
|
|
int SortOrder,
|
|
int? ViewerRangeMin,
|
|
int? ViewerRangeMax,
|
|
int VoteCount,
|
|
int BallotCount,
|
|
int CandidateCount,
|
|
int ReadyCandidateCount,
|
|
int NominationCount,
|
|
int OpenReviewCount,
|
|
bool HasWinner,
|
|
bool WinnerReady,
|
|
bool HasTopVoteTie,
|
|
bool HasMissingClip,
|
|
bool HasRuleConflict,
|
|
bool HasOpenReviews,
|
|
bool HasSoftNominatorWarning,
|
|
IEnumerable<AdminVotingCandidateRankDto> Leaderboard);
|
|
|
|
public sealed record AdminVotingWorkspaceDto(
|
|
AdminVotingWorkspaceSummaryDto Summary,
|
|
IEnumerable<AdminVotingCategoryWorkspaceItemDto> Categories);
|
|
|
|
public sealed record AdminSeasonDetailResponse(
|
|
int Id,
|
|
int Year,
|
|
string Name,
|
|
bool IsDemo,
|
|
string CurrentPhase,
|
|
bool IsCurrent,
|
|
bool IsCommunityOnly,
|
|
DateOnly NominationStartsAt,
|
|
DateOnly NominationEndsAt,
|
|
DateOnly VotingStartsAt,
|
|
DateOnly VotingEndsAt,
|
|
DateOnly ReviewStartsAt,
|
|
DateOnly ReviewEndsAt,
|
|
DateOnly ShowDate,
|
|
TimeOnly ShowStartsAt,
|
|
DateTimeOffset? WinnersPublishedAt,
|
|
string? WinnersPublishedByTwitchId,
|
|
IEnumerable<AdminSubcategoryTemplateDto> SubcategoryTemplates,
|
|
IEnumerable<AdminCategoryItemDto> Categories,
|
|
IEnumerable<AdminCandidateItemDto> Candidates,
|
|
IEnumerable<AdminNominationReviewItemDto> PendingNominations,
|
|
IEnumerable<AdminNominationReviewGroupDto> PendingNominationGroups,
|
|
IEnumerable<AdminNominationReviewItemDto> ReviewedNominations,
|
|
string TrackingReviewNotes,
|
|
bool ShowTrackingReviewNotes,
|
|
IEnumerable<AdminAwardResultItemDto> Results,
|
|
AdminVotingWorkspaceDto VotingWorkspace,
|
|
IEnumerable<AdminClipSubmissionItemDto> ClipSubmissions);
|
|
|
|
public sealed record CreateSeasonRequest(
|
|
int Year,
|
|
string Name,
|
|
string CurrentPhase,
|
|
bool IsCurrent,
|
|
bool IsCommunityOnly,
|
|
DateOnly NominationStartsAt,
|
|
DateOnly NominationEndsAt,
|
|
DateOnly VotingStartsAt,
|
|
DateOnly VotingEndsAt,
|
|
DateOnly ReviewStartsAt,
|
|
DateOnly ReviewEndsAt,
|
|
DateOnly ShowDate,
|
|
TimeOnly ShowStartsAt,
|
|
int? CopyStructureFromSeasonId = null);
|
|
|
|
public sealed record UpdateSeasonRequest(
|
|
int Year,
|
|
string Name,
|
|
string CurrentPhase,
|
|
bool IsCurrent,
|
|
bool IsCommunityOnly,
|
|
DateOnly NominationStartsAt,
|
|
DateOnly NominationEndsAt,
|
|
DateOnly VotingStartsAt,
|
|
DateOnly VotingEndsAt,
|
|
DateOnly ReviewStartsAt,
|
|
DateOnly ReviewEndsAt,
|
|
DateOnly ShowDate,
|
|
TimeOnly ShowStartsAt);
|
|
|
|
public sealed record UpsertCategoryRequest(
|
|
string GroupName,
|
|
string Name,
|
|
string Slug,
|
|
string Description,
|
|
int SortOrder,
|
|
int MaxNomineesPerUser,
|
|
int? ViewerRangeMin,
|
|
int? ViewerRangeMax);
|
|
|
|
public sealed record UpdateSeasonSubcategoryTemplatesRequest(
|
|
AdminSubcategoryTemplateDto[] Templates);
|
|
|
|
public sealed record UpsertCategoryGroupRequest(
|
|
string GroupName,
|
|
string Description,
|
|
int SortOrder,
|
|
int MaxNomineesPerUser);
|
|
|
|
public sealed record UpsertCandidateRequest(
|
|
int CategoryId,
|
|
string DisplayName,
|
|
string ChannelSlug,
|
|
string Platform,
|
|
string? AcceptanceStatus = null,
|
|
string? AcceptanceNote = null,
|
|
string? ClipCompilationUrl = null,
|
|
string? ClipCompilationTitle = null,
|
|
string? ClipCompilationPlatform = null,
|
|
string? ClipEmbedStatus = null);
|
|
|
|
public sealed record SetAwardResultRequest(
|
|
int CategoryId,
|
|
int CandidateId);
|