Feat Backend ERP 1

This commit is contained in:
2026-01-07 11:34:25 -03:00
parent 81aea41e69
commit fdb221d0fa
29 changed files with 1364 additions and 1 deletions

View File

@@ -0,0 +1,37 @@
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;
}