Store round start date in the database (#21153)

This commit is contained in:
DrSmugleaf
2023-10-22 21:01:48 -07:00
committed by GitHub
parent 190b1f61f2
commit 43d5c00648
8 changed files with 3584 additions and 0 deletions

View File

@@ -111,6 +111,13 @@ namespace Content.Server.Database
.HasForeignKey(player => player.PlayerUserId)
.HasPrincipalKey(player => player.UserId);
modelBuilder.Entity<Round>()
.HasIndex(round => round.StartDate);
modelBuilder.Entity<Round>()
.Property(round => round.StartDate)
.HasDefaultValue(default(DateTime));
modelBuilder.Entity<AdminLogPlayer>()
.HasKey(logPlayer => new {logPlayer.PlayerUserId, logPlayer.LogId, logPlayer.RoundId});
@@ -468,6 +475,8 @@ namespace Content.Server.Database
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
public DateTime StartDate { get; set; }
public List<Player> Players { get; set; } = default!;
public List<AdminLog> AdminLogs { get; set; } = default!;