Initial Commit

This commit is contained in:
2026-03-01 15:14:42 -04:00
commit f60174625e
377 changed files with 98166 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using SportsDivision.Domain.Entities;
namespace SportsDivision.Infrastructure.Data.Configurations;
public class TournamentConfiguration : IEntityTypeConfiguration<Tournament>
{
public void Configure(EntityTypeBuilder<Tournament> builder)
{
builder.HasKey(t => t.TournamentId);
builder.Property(t => t.Name).IsRequired().HasMaxLength(200);
builder.Property(t => t.Status).HasConversion<string>().HasMaxLength(20);
builder.Property(t => t.SchoolLevel).HasConversion<string>().HasMaxLength(20);
builder.HasOne(t => t.Zone).WithMany().HasForeignKey(t => t.ZoneId).OnDelete(DeleteBehavior.SetNull);
}
}