Limit player name lengths and fix vote UI defaults

This commit is contained in:
2026-02-02 19:39:32 +01:00
parent 1dc67879e5
commit f33545b184
11 changed files with 334 additions and 26 deletions

View File

@@ -19,9 +19,9 @@ public class AppDbContext : DbContext
modelBuilder.Entity<Player>(builder =>
{
builder.HasKey(p => p.Id);
builder.Property(p => p.DisplayName).HasMaxLength(64);
builder.Property(p => p.Username).IsRequired().HasMaxLength(64);
builder.Property(p => p.NormalizedUsername).IsRequired().HasMaxLength(64);
builder.Property(p => p.DisplayName).HasMaxLength(16);
builder.Property(p => p.Username).IsRequired().HasMaxLength(24);
builder.Property(p => p.NormalizedUsername).IsRequired().HasMaxLength(24);
builder.HasIndex(p => p.NormalizedUsername).IsUnique();
builder.Property(p => p.PasswordHash).IsRequired();
builder.Property(p => p.PasswordSalt).IsRequired();