public void Configure(EntityTypeBuilder <RequestPlayer> builder) { builder.ToTable("request_players"); builder.Property(o => o.Id).HasSnakeCaseColumnName(); builder.Property(o => o.PlayerId).HasSnakeCaseColumnName(); builder.Property(o => o.TeamId).HasSnakeCaseColumnName(); builder.Property(o => o.SeasonId).HasSnakeCaseColumnName(); builder.Property(o => o.ReservationNumber) .HasConversion(o => o.Value, o => ReservationNumber.FromValue(o)) .HasSnakeCaseColumnName(); builder.Property(o => o.ReservationBranchNumber).HasSnakeCaseColumnName(); builder.Property(o => o.Category) .HasSnakeCaseColumnName() .HasEnumerationConversion(); builder.Property(o => o.RequestType) .HasSnakeCaseColumnName() .HasEnumerationConversion(); builder.Property(o => o.ApproveState) .HasSnakeCaseColumnName() .HasEnumerationConversion(); builder.Property(o => o.RequestedDateTime).HasSnakeCaseColumnName(); builder.Property(o => o.PlayerRegistrationFee) .HasConversion(o => o.Value, o => new PlayerRegistrationFee(o)) .HasSnakeCaseColumnName(); builder.Property(o => o.ApproveDateTime).HasSnakeCaseColumnName(); builder.HasOne(o => o.Season); builder.HasOne(o => o.Team); builder.HasOne(o => o.Player); }
public void Configure(EntityTypeBuilder <RequestTeam> builder) { builder.ToTable("request_teams"); builder.Property(o => o.Id).HasSnakeCaseColumnName(); builder.Property(o => o.TeamId).HasSnakeCaseColumnName(); builder.Property(o => o.SeasonId).HasSnakeCaseColumnName(); builder.Property(o => o.ReservationNumber) .HasConversion(o => o.Value, o => ReservationNumber.FromValue(o)) .HasSnakeCaseColumnName(); builder.Property(o => o.ApproveState) .HasSnakeCaseColumnName() .HasEnumerationConversion(); builder.Property(o => o.RequestedDateTime).HasSnakeCaseColumnName(); builder.Property(o => o.RequestedFee) .HasConversion(o => o.Value, o => new RequestedFee(o)) .HasSnakeCaseColumnName(); builder.Property(o => o.ApproveDateTime).HasSnakeCaseColumnName(); builder.Property(o => o.MailState) .HasSnakeCaseColumnName() .HasEnumerationConversion(); builder.HasOne(o => o.Season); builder.HasOne(o => o.Team); }