namespace CMSMicroservice.Application.AppVersionCQ.Queries.GetAppVersion;

/// <summary>
/// Query برای دریافت آخرین نسخه یک اپلیکیشن
/// </summary>
public record GetAppVersionQuery(string AppName, string? CurrentClientVersion = null) : IRequest<AppVersionDto?>;

/// <summary>
/// DTO برای اطلاعات نسخه اپلیکیشن
/// </summary>
public record AppVersionDto
{
    public bool Found { get; init; }
    public string AppName { get; init; } = string.Empty;
    public string CurrentVersion { get; init; } = string.Empty;
    public string MinRequiredVersion { get; init; } = string.Empty;
    public bool RequiresFullCacheClear { get; init; }
    public bool RequiresUpdate { get; init; }
    public string? UpdateMessage { get; init; }
    public string? ReleaseNotes { get; init; }
    public DateTime? LastUpdated { get; init; }
}
