feat: Add SitePageSettings - simplified page management system
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m2s

- New entities: SitePageSettings + SitePageImage (4 fixed pages)
- EF Migration: AddSitePageSettings (SitePageSettings + SitePageImages tables)
- Proto: sitepagesettings.proto with 5 RPCs
- CQRS: GetPageSettings, GetAllPageSettings, SavePageSettings, SavePageImage, DeletePageImage
- gRPC Service: SitePageSettingsService (auto-registered)
- Proto NuGet bumped to 0.0.180
This commit is contained in:
masoodafar-web
2026-02-17 22:34:29 +03:30
parent 89e146bf32
commit fd24dcebcd
18 changed files with 5860 additions and 1 deletions
@@ -0,0 +1,44 @@
using CMSMicroservice.Domain.Entities.Content;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace CMSMicroservice.Infrastructure.Persistence.Configurations;
public class SitePageSettingsConfiguration : IEntityTypeConfiguration<SitePageSettings>
{
public void Configure(EntityTypeBuilder<SitePageSettings> builder)
{
builder.ToTable("SitePageSettings");
builder.HasKey(x => x.Id);
builder.Property(x => x.PageKey)
.IsRequired()
.HasMaxLength(50);
builder.Property(x => x.Title)
.IsRequired()
.HasMaxLength(200);
builder.Property(x => x.MetaDescription)
.HasMaxLength(300);
builder.Property(x => x.HeroTitle)
.HasMaxLength(200);
builder.Property(x => x.HeroSubtitle)
.HasMaxLength(500);
builder.Property(x => x.IsActive)
.IsRequired()
.HasDefaultValue(true);
// SettingsJson — ستون JSON بدون محدودیت طول
builder.Property(x => x.SettingsJson)
.HasColumnType("nvarchar(max)");
// ایندکس یکتا روی PageKey
builder.HasIndex(x => x.PageKey)
.IsUnique()
.HasDatabaseName("IX_SitePageSettings_PageKey");
}
}