Store round start date in the database (#21153)
This commit is contained in:
@@ -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!;
|
||||
|
||||
Reference in New Issue
Block a user