Tournament Entities
Entities for fishing tournaments, registrations, results, and prizes.
Tournament
Purpose: Represents a fishing tournament/competition with registration, payment, and results management.
Key Fields:
Id(int): Unique identifierOrganizerId: User who created the tournamentName: Tournament nameDescription: Detailed descriptionLocation: Tournament locationLatitude,Longitude: Location coordinatesTournamentType: SingleDay, MultiDay, SeriesFormat: Individual, TeamRegistrationStartDate,RegistrationEndDate: Registration periodStartDate,EndDate: Tournament datesEntryFee: Entry fee per angler/teamRequiresPayment: Whether payment is requiredStripeProductId,StripePriceId: Stripe payment integrationTotalPrizePool: Total prize pool amountMaxParticipants: Maximum participantsStatus: Draft, Open, InProgress, Completed, Cancelled
Relationships:
- Many-to-one: User (organizer)
- One-to-many: TournamentCategory, TournamentRegistration, TournamentResult, TournamentRule, TournamentSponsor, TournamentTeam
Usage Patterns:
// Create tournament
var tournament = new Tournament
{{
OrganizerId = organizerId,
Name = "Lake Michigan Salmon Classic 2024",
StartDate = startDate,
EndDate = endDate,
EntryFee = 100.00m,
RequiresPayment = true,
Status = TournamentStatus.Open
}};
// Get active tournaments
var tournaments = context.Tournaments
.Where(t => t.Status == TournamentStatus.Open)
.Include(t => t.Organizer)
.Include(t => t.Categories)
.ToList();
TournamentRegistration
Purpose: User/team registration for a tournament.
Key Fields:
Id(int): Unique identifierTournamentId: Associated tournamentUserId: Registered userCategoryId: Tournament category/divisionTeamId: Team (if team format)PaymentStatus: Pending, Paid, Failed, RefundedStripePaymentIntentId: Stripe payment intentRegisteredAt: Registration timestamp
Relationships:
- Many-to-one: Tournament, User, TournamentCategory, TournamentTeam
Usage Patterns:
// Register for tournament
var registration = new TournamentRegistration
{{
TournamentId = tournamentId,
UserId = userId,
CategoryId = categoryId,
PaymentStatus = PaymentStatus.Pending,
RegisteredAt = DateTime.UtcNow
}};
// Get user's registrations
var registrations = context.TournamentRegistrations
.Where(tr => tr.UserId == userId)
.Include(tr => tr.Tournament)
.Include(tr => tr.Category)
.ToList();
TournamentResult
Purpose: Tournament catch results and leaderboard entries.
Key Fields:
Id(int): Unique identifierTournamentId: Associated tournamentRegistrationId: Associated registrationFishingLogEntryId: Catch log entryRank: Final rank/positionPoints: Points earnedWeightLb: Fish weightLengthInches: Fish lengthSubmittedAt: When result was submitted
Relationships:
- Many-to-one: Tournament, TournamentRegistration, FishingLogEntry
TournamentCategory
Purpose: Categories/divisions within a tournament (e.g., by species, age group, skill level).
Key Fields:
Id(int): Unique identifierTournamentId: Associated tournamentName: Category nameSpeciesId: Species-specific categoryMinAge,MaxAge: Age requirementsSkillLevel: Skill level requirementEntryFee: Category-specific entry feePrizePool: Prize pool for this category
Relationships:
- Many-to-one: Tournament, FishSpecies
- One-to-many: TournamentRegistration, TournamentResult, TournamentPrize
TournamentTeam
Purpose: Teams for team-format tournaments.
Key Fields:
Id(int): Unique identifierTournamentId: Associated tournamentTeamName: Team nameCaptainUserId: Team captainMaxMembers: Maximum team size
Relationships:
- Many-to-one: Tournament, User (captain)
- One-to-many: TournamentRegistration
TournamentPrize
Purpose: Prizes for tournament winners.
Key Fields:
Id(int): Unique identifierTournamentId: Associated tournamentCategoryId: Category (if category-specific)Place: Prize place (1st, 2nd, 3rd, etc.)PrizeType: Cash, Trophy, Gear, etc.Amount: Prize amount/valueDescription: Prize description
Relationships:
- Many-to-one: Tournament, TournamentCategory
TournamentRule
Purpose: Tournament rules and regulations.
Key Fields:
Id(int): Unique identifierTournamentId: Associated tournamentRuleText: Rule textRuleType: General, Species, Size, etc.Order: Display order
Relationships:
- Many-to-one: Tournament
TournamentSponsor
Purpose: Tournament sponsors.
Key Fields:
Id(int): Unique identifierTournamentId: Associated tournamentSponsorName: Sponsor nameSponsorLogoUrl: Logo URLSponsorWebsite: Website URLSponsorLevel: Gold, Silver, Bronze, etc.
Relationships:
- Many-to-one: Tournament
TournamentEligibilityRule
Purpose: Eligibility rules for tournament participation.
Key Fields:
Id(int): Unique identifierTournamentId: Associated tournamentRuleType: Age, License, Experience, etc.RuleValue: Rule value/criteria
Relationships:
- Many-to-one: Tournament
Related Documentation
- Tournament System - Complete tournament documentation
- Tournament Eligibility - Eligibility rules
- Stripe Integration - Payment processing