37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
|
|
namespace SIGCM.Application.DTOs;
|
||
|
|
|
||
|
|
public class CreateOrderDto
|
||
|
|
{
|
||
|
|
public int ClientId { get; set; } // Quién compra
|
||
|
|
public int SellerId { get; set; } // Quién vende (Usuario logueado)
|
||
|
|
public List<OrderItemDto> Items { get; set; } = new();
|
||
|
|
|
||
|
|
public DateTime? DueDate { get; set; } // Para Cta Cte
|
||
|
|
public string? Notes { get; set; }
|
||
|
|
|
||
|
|
// Si es true, la orden nace como "Pagada" (Venta Contado)
|
||
|
|
// Si es false, nace como "Pendiente" (Cuenta Corriente)
|
||
|
|
public bool IsDirectPayment { get; set; } = true;
|
||
|
|
}
|
||
|
|
|
||
|
|
public class OrderItemDto
|
||
|
|
{
|
||
|
|
public int ProductId { get; set; }
|
||
|
|
public decimal Quantity { get; set; }
|
||
|
|
|
||
|
|
// Opcional: Si el vendedor aplica un descuento manual unitario
|
||
|
|
// (Por ahora usaremos el precio base del producto)
|
||
|
|
// public decimal? ManualUnitPrice { get; set; }
|
||
|
|
|
||
|
|
// Para vincular con un aviso específico creado previamente
|
||
|
|
public int? RelatedEntityId { get; set; }
|
||
|
|
public string? RelatedEntityType { get; set; } // 'Listing'
|
||
|
|
}
|
||
|
|
|
||
|
|
public class OrderResultDto
|
||
|
|
{
|
||
|
|
public int OrderId { get; set; }
|
||
|
|
public string OrderNumber { get; set; } = string.Empty;
|
||
|
|
public decimal TotalAmount { get; set; }
|
||
|
|
public string Status { get; set; } = string.Empty;
|
||
|
|
}
|