16160f6424
Initial version of the data model Includes EF initialization and migrations EF migrations are applied on application start
26 lines
576 B
C#
26 lines
576 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace TournamentOrganizer.Models;
|
|
|
|
public enum RoundState
|
|
{
|
|
WAITING,
|
|
STARTED,
|
|
FINISHED
|
|
}
|
|
|
|
public class Round
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int Id { get; set; }
|
|
public int MatchId { get; set; }
|
|
public RoundState State { get; set; } = RoundState.WAITING;
|
|
|
|
public required List<PlayerParticipant> Players;
|
|
public required Match Match { get; set; }
|
|
|
|
} |