feat: Add SitePageSettings - simplified page management system
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m2s
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:
@@ -0,0 +1,70 @@
|
||||
using CMSMicroservice.Domain.Common;
|
||||
|
||||
namespace CMSMicroservice.Domain.Entities.Content;
|
||||
|
||||
/// <summary>
|
||||
/// تصاویر مرتبط با صفحات سایت
|
||||
/// شامل: مجوزها، اعضای تیم، ارزشها و سایر آیتمهای تصویری
|
||||
/// </summary>
|
||||
public class SitePageImage : BaseAuditableEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// شناسه صفحه مرتبط
|
||||
/// </summary>
|
||||
public long SitePageSettingsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// گروه تصویر (licenses, team, values)
|
||||
/// </summary>
|
||||
public string ImageGroup { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// عنوان
|
||||
/// </summary>
|
||||
public string? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// زیرعنوان
|
||||
/// </summary>
|
||||
public string? Subtitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// توضیحات
|
||||
/// </summary>
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مسیر تصویر اصلی
|
||||
/// </summary>
|
||||
public string ImagePath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// مسیر تامبنیل
|
||||
/// </summary>
|
||||
public string? ThumbnailPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لینک خارجی (برای مجوزها: لینک به سایت مرجع)
|
||||
/// </summary>
|
||||
public string? LinkUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام آیکون Material
|
||||
/// </summary>
|
||||
public string? IconName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ترتیب نمایش
|
||||
/// </summary>
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// فعال بودن
|
||||
/// </summary>
|
||||
public bool IsActive { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// صفحه مرتبط
|
||||
/// </summary>
|
||||
public virtual SitePageSettings SitePageSettings { get; set; } = null!;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using CMSMicroservice.Domain.Common;
|
||||
|
||||
namespace CMSMicroservice.Domain.Entities.Content;
|
||||
|
||||
/// <summary>
|
||||
/// تنظیمات صفحات سایت — هر صفحه یک رکورد با تنظیمات JSON تایپشده
|
||||
/// صفحات ثابت: landing, about, contact, licenses
|
||||
/// </summary>
|
||||
public class SitePageSettings : BaseAuditableEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// کلید یکتای صفحه (landing, about, contact, licenses)
|
||||
/// </summary>
|
||||
public string PageKey { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// عنوان صفحه
|
||||
/// </summary>
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// توضیح متا برای SEO
|
||||
/// </summary>
|
||||
public string? MetaDescription { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// عنوان بخش Hero
|
||||
/// </summary>
|
||||
public string? HeroTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// زیرعنوان بخش Hero
|
||||
/// </summary>
|
||||
public string? HeroSubtitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مسیر تصویر Hero
|
||||
/// </summary>
|
||||
public string? HeroImagePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// فعال بودن صفحه
|
||||
/// </summary>
|
||||
public bool IsActive { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// تنظیمات اختصاصی صفحه به فرمت JSON
|
||||
/// ساختار JSON بر اساس PageKey متفاوت است
|
||||
/// </summary>
|
||||
public string? SettingsJson { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تصاویر مرتبط با صفحه (مجوزها، تیم، ارزشها)
|
||||
/// </summary>
|
||||
public virtual ICollection<SitePageImage> Images { get; set; } = new List<SitePageImage>();
|
||||
}
|
||||
Reference in New Issue
Block a user