forked from sanchezvem/PyroFetes
MAJ Mathilde
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using PyroFetes.Models;
|
||||
|
||||
namespace PyroFetes.DTO.Product.Request;
|
||||
namespace API.DTO.Product.Request;
|
||||
|
||||
public class CreateProductDto
|
||||
{
|
||||
@@ -11,11 +9,28 @@ public class CreateProductDto
|
||||
public int ApprovalNumber { get; set; }
|
||||
public decimal Weight { get; set; }
|
||||
public decimal Nec { get; set; }
|
||||
public decimal SellingPrice {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 au produit
|
||||
public List<ProductSupplierPriceDto>? Suppliers { get; set; }
|
||||
|
||||
// Liste des entrepôts liés au produit (ajoutée ici)
|
||||
public List<CreateProductWarehouseDto>? Warehouses { get; set; }
|
||||
}
|
||||
|
||||
public class ProductSupplierPriceDto
|
||||
{
|
||||
public int SupplierId { get; set; }
|
||||
public decimal SellingPrice { get; set; }
|
||||
}
|
||||
|
||||
public class CreateProductWarehouseDto
|
||||
{
|
||||
public int WarehouseId { get; set; }
|
||||
public int Quantity { get; set; }
|
||||
}
|
@@ -1,20 +1,32 @@
|
||||
using PyroFetes.Models;
|
||||
|
||||
namespace PyroFetes.DTO.Product.Request;
|
||||
namespace API.DTO.Product.Request;
|
||||
|
||||
public class UpdateProductDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int Reference { get; set; }
|
||||
public int References { 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 decimal SellingPrice { get; set; }
|
||||
public string? Image { get; set; }
|
||||
public string? Link { get; set; }
|
||||
public int ClassificationId { get; set;}
|
||||
public int ClassificationId { get; set; }
|
||||
public int ProductCategoryId { get; set; }
|
||||
}
|
||||
|
||||
// Liste des fournisseurs associés
|
||||
public List<ProductSupplierPriceDto> Suppliers { get; set; }
|
||||
|
||||
// Liste des entrepôts associés (corrigé ici)
|
||||
public List<UpdateProductWarehouseDto> Warehouses { get; set; }
|
||||
}
|
||||
|
||||
// DTO pour la mise à jour des entrepôts liés
|
||||
public class UpdateProductWarehouseDto
|
||||
{
|
||||
public int WarehouseId { get; set; }
|
||||
public int Quantity { get; set; }
|
||||
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
using PyroFetes.Models;
|
||||
using API.DTO.Product.Request;
|
||||
|
||||
namespace PyroFetes.DTO.Product.Response;
|
||||
namespace API.DTO.Product.Response;
|
||||
|
||||
public class GetProductDto
|
||||
{
|
||||
@@ -12,12 +12,30 @@ public class GetProductDto
|
||||
public int ApprovalNumber { get; set; }
|
||||
public decimal Weight { get; set; }
|
||||
public decimal Nec { get; set; }
|
||||
public decimal SellingPrice {get; set;}
|
||||
public decimal SellingPrice { get; set; }
|
||||
public string? Image { get; set; }
|
||||
public string? Link { get; set; }
|
||||
public int ClassificationId { get; set;}
|
||||
public string? ClassificationLabel { get; set; }
|
||||
public int ClassificationId { get; set; }
|
||||
public int ProductCategoryId { get; set; }
|
||||
public string? ProductCategoryLabel { 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();
|
||||
}
|
||||
|
||||
|
||||
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; }
|
||||
}
|
@@ -8,4 +8,13 @@ public class CreateSupplierDto
|
||||
public string Adress { get; set; }
|
||||
public int ZipCode { get; set; }
|
||||
public string City { get; set; }
|
||||
|
||||
// Produits que ce fournisseur fournit
|
||||
public List<SupplierProductPriceDto>? Products { get; set; }
|
||||
}
|
||||
|
||||
public class SupplierProductPriceDto
|
||||
{
|
||||
public int ProductId { get; set; }
|
||||
public decimal SellingPrice { get; set; }
|
||||
}
|
@@ -9,4 +9,6 @@ public class UpdateSupplierDto
|
||||
public string Adress { get; set; }
|
||||
public int ZipCode { get; set; }
|
||||
public string City { get; set; }
|
||||
|
||||
public List<SupplierProductPriceDto>? Products { get; set; }
|
||||
}
|
@@ -1,4 +1,6 @@
|
||||
namespace API.DTO.Supplier.Response;
|
||||
using API.DTO.Supplier.Request;
|
||||
|
||||
namespace API.DTO.Supplier.Response;
|
||||
|
||||
public class GetSupplierDto
|
||||
{
|
||||
@@ -9,4 +11,14 @@ public class GetSupplierDto
|
||||
public string Adress { get; set; }
|
||||
public int ZipCode { get; set; }
|
||||
public string City { get; set; }
|
||||
|
||||
// Liste des produits liés avec leur prix fournisseur
|
||||
public List<SupplierProductPriceDto> Products { get; set; }
|
||||
}
|
||||
|
||||
public class GetSupplierProductDto
|
||||
{
|
||||
public int ProductId { get; set; }
|
||||
public string ProductName { get; set; } = string.Empty;
|
||||
public decimal SellingPrice { get; set; }
|
||||
}
|
@@ -2,11 +2,20 @@
|
||||
|
||||
public class CreateWarehouseDto
|
||||
{
|
||||
public string Name {get; set;}
|
||||
public int MaxWeight {get; set;}
|
||||
public int Current {get; set;}
|
||||
public int MinWeight {get; set;}
|
||||
public string Name { get; set; }
|
||||
public int MaxWeight { get; set; }
|
||||
public int Current { get; set; }
|
||||
public int MinWeight { get; set; }
|
||||
public string Adress { get; set; }
|
||||
public int ZipCode { get; set; }
|
||||
public string City { get; set; }
|
||||
|
||||
// Liste des produits à stocker dans cet entrepôt
|
||||
public List<CreateWarehouseProductDto>? Products { get; set; }
|
||||
}
|
||||
|
||||
public class CreateWarehouseProductDto
|
||||
{
|
||||
public int ProductId { get; set; }
|
||||
public int Quantity { get; set; }
|
||||
}
|
@@ -1,13 +1,21 @@
|
||||
namespace API.DTO.Warehouse.Request;
|
||||
namespace API.DTO.Warehouse.Request;
|
||||
|
||||
public class UpdateWarehouseDto
|
||||
{
|
||||
public int Id {get; set;}
|
||||
public string Name {get; set;}
|
||||
public int MaxWeight {get; set;}
|
||||
public int Current {get; set;}
|
||||
public int MinWeight {get; set;}
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int MaxWeight { get; set; }
|
||||
public int Current { get; set; }
|
||||
public int MinWeight { get; set; }
|
||||
public string Adress { get; set; }
|
||||
public int ZipCode { get; set; }
|
||||
public string City { get; set; }
|
||||
|
||||
public List<UpdateWarehouseProductDto>? Products { get; set; }
|
||||
}
|
||||
|
||||
public class UpdateWarehouseProductDto
|
||||
{
|
||||
public int ProductId { get; set; }
|
||||
public int Quantity { get; set; }
|
||||
}
|
@@ -1,13 +1,22 @@
|
||||
namespace API.DTO.Warehouse.Response;
|
||||
namespace API.DTO.Warehouse.Response;
|
||||
|
||||
public class GetWarehouseDto
|
||||
{
|
||||
public int Id {get; set;}
|
||||
public string Name {get; set;}
|
||||
public int MaxWeight {get; set;}
|
||||
public int Current {get; set;}
|
||||
public int MinWeight {get; set;}
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int MaxWeight { get; set; }
|
||||
public int Current { get; set; }
|
||||
public int MinWeight { get; set; }
|
||||
public string Adress { get; set; }
|
||||
public int ZipCode { get; set; }
|
||||
public string City { get; set; }
|
||||
|
||||
public List<WarehouseProductDto>? Products { get; set; }
|
||||
}
|
||||
|
||||
public class WarehouseProductDto
|
||||
{
|
||||
public int ProductId { get; set; }
|
||||
public string? ProductName { get; set; }
|
||||
public int Quantity { get; set; }
|
||||
}
|
Reference in New Issue
Block a user