using CMSMicroservice.Application.Common.Models;
using CMSMicroservice.Domain.Enums;
namespace CMSMicroservice.Application.UserOrderCQ.Queries.GetOrdersByDateRange;
///
/// دریافت سفارشات بر اساس بازه زمانی
///
public record GetOrdersByDateRangeQuery : IRequest
{
///
/// تاریخ شروع (UTC)
///
public DateTime StartDate { get; init; }
///
/// تاریخ پایان (UTC)
///
public DateTime EndDate { get; init; }
///
/// فیلتر وضعیت تحویل (اختیاری)
///
public DeliveryStatus? Status { get; init; }
///
/// شناسه کاربر (اختیاری - برای فیلتر بر اساس کاربر)
///
public long? UserId { get; init; }
///
/// شماره صفحه
///
public int PageIndex { get; init; } = 1;
///
/// تعداد در صفحه
///
public int PageSize { get; init; } = 20;
}
///
/// پاسخ لیست سفارشات
///
public class GetOrdersByDateRangeResponseDto
{
public MetaData MetaData { get; set; } = new();
public List Orders { get; set; } = new();
}
///
/// خلاصه اطلاعات سفارش
///
public class OrderSummaryDto
{
public long Id { get; set; }
public long UserId { get; set; }
public string UserFullName { get; set; } = string.Empty;
public long Amount { get; set; }
public long DiscountedPrice { get; set; }
public DeliveryStatus Status { get; set; }
public DateTime Created { get; set; }
public DateTime? ShippedAt { get; set; }
public DateTime? DeliveredAt { get; set; }
public int ItemsCount { get; set; }
}