Maj Warehouse et Supplier

This commit is contained in:
2025-10-09 15:39:10 +02:00
parent d1fa3aca68
commit 08bf910437
11 changed files with 124 additions and 94 deletions

View File

@@ -1,41 +1,29 @@
using API.DTO.Product.Request;
using PyroFetes.DTO.Product.Request;
using PyroFetes.DTO.Product.Response;
namespace API.DTO.Product.Response;
public class GetProductDto
namespace API.DTO.Product.Response
{
public int Id { get; set; }
public int Reference { get; set; }
public string? Name { get; set; }
public decimal Duration { get; set; }
public decimal Caliber { get; set; }
public int ApprovalNumber { get; set; }
public decimal Weight { get; set; }
public decimal Nec { get; set; }
public decimal SellingPrice { get; set; }
public string? Image { get; set; }
public string? Link { get; set; }
public int ClassificationId { get; set; }
public int ProductCategoryId { get; set; }
public class GetProductDto
{
public int Id { get; set; }
public int Reference { get; set; }
public string? Name { get; set; }
public decimal Duration { get; set; }
public decimal Caliber { get; set; }
public int ApprovalNumber { get; set; }
public decimal Weight { get; set; }
public decimal Nec { get; set; }
public decimal SellingPrice { get; set; }
public string? Image { get; set; }
public string? Link { get; set; }
public int ClassificationId { get; set; }
public int ProductCategoryId { get; set; }
// Liste des fournisseurs liés avec leur prix de vente
public List<ProductSupplierPriceDto> Suppliers { get; set; }
public List<GetProductWarehouseDto> Warehouses { get; set; } = new();
}
// Fournisseurs liés
public List<ProductSupplierPriceDto> Suppliers { get; set; } = new();
public class GetProductSupplierDto
{
public int SupplierId { get; set; }
public string SupplierName { get; set; } = string.Empty;
public decimal SellingPrice { get; set; }
}
public class GetProductWarehouseDto
{
public int WarehouseId { get; set; }
public string WarehouseName { get; set; } = string.Empty;
public int Quantity { get; set; }
// Entrepôts liés
public List<GetProductWarehouseDto> Warehouses { get; set; } = new();
}
}