feat(AppVersion): Add version tracking system for frontend cache invalidation
Build and Deploy to Production / build-and-deploy (push) Successful in 1m37s

- Add AppVersion entity with CurrentVersion, MinRequiredVersion, RequiresFullCacheClear
- Add GetAppVersion query to check app version and compare with client version
- Add GetAllAppVersions query for admin panel
- Add UpdateAppVersion command to update/create app versions
- Add appversion.proto for gRPC communication
- Add AppVersionService for gRPC endpoints
- Add database migration for AppVersions table
This commit is contained in:
masoodafar-web
2025-12-25 18:06:12 +03:30
parent 2e54aa7aca
commit 17c2958b9c
15 changed files with 4244 additions and 0 deletions
@@ -0,0 +1,43 @@
namespace CMSMicroservice.Domain.Entities.Configuration;
/// <summary>
/// نسخه اپلیکیشن‌های فرانت‌اند
/// وقتی ورژن آپدیت بشه، فرانت‌ها باید کش و داده‌های محلی رو پاک کنن
/// </summary>
public class AppVersion : BaseAuditableEntity
{
/// <summary>
/// نام اپلیکیشن (FrontOffice, BackOffice, MobileApp)
/// </summary>
public string AppName { get; set; } = string.Empty;
/// <summary>
/// شماره نسخه فعلی (مثلاً 1.2.3)
/// </summary>
public string CurrentVersion { get; set; } = string.Empty;
/// <summary>
/// حداقل نسخه مورد نیاز - اگر کاربر از این پایین‌تر باشه باید آپدیت کنه
/// </summary>
public string MinRequiredVersion { get; set; } = string.Empty;
/// <summary>
/// آیا کش کامل باید پاک بشه؟
/// </summary>
public bool RequiresFullCacheClear { get; set; }
/// <summary>
/// پیام آپدیت برای نمایش به کاربر
/// </summary>
public string? UpdateMessage { get; set; }
/// <summary>
/// توضیحات تغییرات این نسخه
/// </summary>
public string? ReleaseNotes { get; set; }
/// <summary>
/// فعال یا غیرفعال
/// </summary>
public bool IsActive { get; set; } = true;
}