namespace PostFundManagement.Domain.Configuration; public sealed class Organisation : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable(nameof(Entities.Organisation).Pluralize()); builder.HasKey(pk => pk.Id); builder.Property(f => f.CreatedBy).IsRequired(); builder.Property(f => f.CreatedAt).IsRequired().HasDefaultValueSql("now()"); builder.Property(f => f.RegistrationNo).IsRequired().HasMaxLength(256); builder.Property(f => f.Name).IsRequired().HasMaxLength(256); builder.Property(f => f.Email).IsRequired().HasMaxLength(256); builder.Property(f => f.Type).IsRequired().HasDefaultValue(OrganisationType.PrivateLimitedCompany); builder.Property(f => f.Status).IsRequired().HasDefaultValue(ActivityStatus.Active); builder.HasOne(f => f.Creator) .WithMany() .HasForeignKey(fk => fk.CreatedBy) .IsRequired() .OnDelete(DeleteBehavior.NoAction); } }