feat: refactor week number handling to use WeekDefinitionId across multiple entities and queries
This commit is contained in:
+45
@@ -0,0 +1,45 @@
|
||||
using CMSMicroservice.Application.Common.Models;
|
||||
|
||||
namespace CMSMicroservice.Application.CommissionCQ.Queries.GetWeekDefinitions;
|
||||
|
||||
/// <summary>
|
||||
/// Query برای دریافت لیست هفتهها از کش (برای dropdown)
|
||||
/// </summary>
|
||||
public record GetWeekDefinitionsQuery : IRequest<GetWeekDefinitionsResponseDto>
|
||||
{
|
||||
//موقعیت صفحه بندی
|
||||
public PaginationState? PaginationState { get; init; }
|
||||
|
||||
//مرتب سازی بر اساس
|
||||
public string? SortBy { get; init; }
|
||||
|
||||
//فیلتر
|
||||
public GetWeekDefinitionsFilter? Filter { get; init; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// فیلترهای جستجوی هفتهها
|
||||
/// </summary>
|
||||
public class GetWeekDefinitionsFilter
|
||||
{
|
||||
//جستجوی متنی روی DisplayName (مثل "هفته یک")
|
||||
public string? SearchText { get; set; }
|
||||
|
||||
//شماره ترتیب هفته
|
||||
public int? WeekOrder { get; set; }
|
||||
|
||||
//شماره هفته میلادی (2025-W46)
|
||||
public string? GregorianWeekNumber { get; set; }
|
||||
|
||||
//شماره هفته شمسی (1404-W35)
|
||||
public string? PersianWeekNumber { get; set; }
|
||||
|
||||
//سال میلادی
|
||||
public int? GregorianYear { get; set; }
|
||||
|
||||
//سال شمسی
|
||||
public int? PersianYear { get; set; }
|
||||
|
||||
//فقط هفتههای فعال
|
||||
public bool? IsActive { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user