Refactored database registration to allow postgres to use internal representations for afster performance
This commit is contained in:
@@ -18,7 +18,8 @@ public sealed class AuthorConfiguration : IEntityTypeConfiguration<Author>
|
||||
builder.Property(f => f.Website).IsRequired(false).HasMaxLength(1024);
|
||||
builder.Property(f => f.ImageUrl).IsRequired().HasMaxLength(2048);
|
||||
builder.Property(f => f.ThumbnailImageUrl).IsRequired(false).HasMaxLength(2048);
|
||||
builder.Property(f => f.SocialMedia).IsRequired(false).HasColumnType("jsonb");
|
||||
builder.Property(f => f.Enabled).HasDefaultValue(true);
|
||||
|
||||
builder.OwnsMany(f => f.SocialMedia, b => { b.ToJson(); });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user