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
@@ -826,6 +826,81 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
b.ToTable("SitePages", "CMS");
});
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Content.SitePageImage", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTime>("Created")
.HasColumnType("datetime2");
b.Property<string>("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("IconName")
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<string>("ImageGroup")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("ImagePath")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(true);
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<DateTime?>("LastModified")
.HasColumnType("datetime2");
b.Property<string>("LastModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property<string>("LinkUrl")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<long>("SitePageSettingsId")
.HasColumnType("bigint");
b.Property<int>("SortOrder")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(0);
b.Property<string>("Subtitle")
.HasMaxLength(300)
.HasColumnType("nvarchar(300)");
b.Property<string>("ThumbnailPath")
.HasColumnType("nvarchar(max)");
b.Property<string>("Title")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.HasKey("Id");
b.HasIndex("SitePageSettingsId", "ImageGroup")
.HasDatabaseName("IX_SitePageImages_SettingsId_Group");
b.ToTable("SitePageImages", "CMS");
});
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Content.SitePageSection", b =>
{
b.Property<long>("Id")
@@ -900,6 +975,71 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
b.ToTable("SitePageSections", "CMS");
});
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Content.SitePageSettings", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<DateTime>("Created")
.HasColumnType("datetime2");
b.Property<string>("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property<string>("HeroImagePath")
.HasColumnType("nvarchar(max)");
b.Property<string>("HeroSubtitle")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<string>("HeroTitle")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.Property<bool>("IsActive")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(true);
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<DateTime?>("LastModified")
.HasColumnType("datetime2");
b.Property<string>("LastModifiedBy")
.HasColumnType("nvarchar(max)");
b.Property<string>("MetaDescription")
.HasMaxLength(300)
.HasColumnType("nvarchar(300)");
b.Property<string>("PageKey")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("SettingsJson")
.HasColumnType("nvarchar(max)");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("nvarchar(200)");
b.HasKey("Id");
b.HasIndex("PageKey")
.IsUnique()
.HasDatabaseName("IX_SitePageSettings_PageKey");
b.ToTable("SitePageSettings", "CMS");
});
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Contract", b =>
{
b.Property<long>("Id")
@@ -3807,6 +3947,17 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
b.Navigation("WeekDefinition");
});
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Content.SitePageImage", b =>
{
b.HasOne("CMSMicroservice.Domain.Entities.Content.SitePageSettings", "SitePageSettings")
.WithMany("Images")
.HasForeignKey("SitePageSettingsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("SitePageSettings");
});
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Content.SitePageSection", b =>
{
b.HasOne("CMSMicroservice.Domain.Entities.Content.SitePage", "SitePage")
@@ -4363,6 +4514,11 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
b.Navigation("Sections");
});
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Content.SitePageSettings", b =>
{
b.Navigation("Images");
});
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Contract", b =>
{
b.Navigation("UserContracts");