Commentaire des DTO

This commit is contained in:
2025-10-10 11:21:57 +02:00
parent 44da6ed371
commit b3347fe163
33 changed files with 595 additions and 240 deletions

View File

@@ -1,20 +1,37 @@
namespace PyroFetes.DTO.Supplier.Request;
public class CreateSupplierDto
namespace PyroFetes.DTO.Supplier.Request
{
public string Name { get; set; }
public string Email { get; set; }
public string PhoneNumber { get; set; }
public string Adress { get; set; }
public int ZipCode { get; set; }
public string City { get; set; }
// DTO pour créer un nouveau fournisseur
public class CreateSupplierDto
{
// Nom du fournisseur
public string Name { get; set; }
// Produits que ce fournisseur fournit
public List<SupplierProductPriceDto>? Products { get; set; }
}
// Email du fournisseur
public string Email { get; set; }
public class SupplierProductPriceDto
{
public int ProductId { get; set; }
public decimal SellingPrice { get; set; }
// Numéro de téléphone du fournisseur
public string PhoneNumber { get; set; }
// Adresse du fournisseur
public string Adress { get; set; }
// Code postal de l'adresse
public int ZipCode { get; set; }
// Ville de l'adresse
public string City { get; set; }
// Liste des produits fournis par ce fournisseur dans la classe SupplierProductPriceDto
public List<SupplierProductPriceDto>? Products { get; set; }
}
// DTO pour relier un produit et son prix à un fournisseur
public class SupplierProductPriceDto
{
// Identifiant du produit fourni
public int ProductId { get; set; }
// Prix de vente du produit par ce fournisseur
public decimal SellingPrice { get; set; }
}
}