16160f6424
Initial version of the data model Includes EF initialization and migrations EF migrations are applied on application start
32 lines
743 B
C#
32 lines
743 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace TournamentOrganizer.Models;
|
|
|
|
public enum RuleSet
|
|
{
|
|
DoubleElimination,
|
|
SingleElimination,
|
|
RoundRobin,
|
|
Swiss
|
|
}
|
|
|
|
public class Game
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int Id { get; set; }
|
|
public string Name { get; set; } = "Example Game";
|
|
public string Description { get; set; } = "Example Game Description";
|
|
|
|
public RuleSet S1RuleSet { get; set; }
|
|
public int S1Groups;
|
|
public int S1GroupAdvances;
|
|
|
|
public RuleSet? S2RuleSet { get; set; }
|
|
|
|
public required List<Tournament> Tournaments { get; set; }
|
|
|
|
} |