diff --git a/PyroFetes/DTO/ProductColor/Request/ProductColorDto.cs b/PyroFetes/DTO/ProductColor/Request/ProductColorDto.cs new file mode 100644 index 0000000..bff60cb --- /dev/null +++ b/PyroFetes/DTO/ProductColor/Request/ProductColorDto.cs @@ -0,0 +1,7 @@ +namespace PyroFetes.DTO.ProductColor.Request; +// DTO utilisé pour créer ou mettre à jour la relation Product <-> Color +public class ProductColorDto +{ + public int ProductId { get; set; } // Id du produit (pour update) + public int ColorId { get; set; } // Id de la couleur +} \ No newline at end of file diff --git a/PyroFetes/DTO/ProductColor/Response/GetProductColorDto.cs b/PyroFetes/DTO/ProductColor/Response/GetProductColorDto.cs new file mode 100644 index 0000000..50356f9 --- /dev/null +++ b/PyroFetes/DTO/ProductColor/Response/GetProductColorDto.cs @@ -0,0 +1,11 @@ +namespace PyroFetes.DTO.ProductColor.Response; +// DTO utilisé pour renvoyer les informations d’un produit lié à une couleur + +public class GetProductColorDto +{ + // Identifiant du produit concerné + public int ProductId { get; set; } + + // Identifiant de la couleur + public int ColorId { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/ProductEffect/Request/ProductEffectDto.cs b/PyroFetes/DTO/ProductEffect/Request/ProductEffectDto.cs new file mode 100644 index 0000000..ae3b676 --- /dev/null +++ b/PyroFetes/DTO/ProductEffect/Request/ProductEffectDto.cs @@ -0,0 +1,8 @@ +namespace PyroFetes.DTO.ProductEffect.Request; + +// DTO utilisé pour créer ou mettre à jour la relation Product <-> Effect +public class ProductEffectDto +{ + public int ProductId { get; set; } // Id du produit (pour update) + public int EffectId { get; set; } // Id de l'effet +} \ No newline at end of file diff --git a/PyroFetes/DTO/ProductEffect/Response/GetProductEffectDto.cs b/PyroFetes/DTO/ProductEffect/Response/GetProductEffectDto.cs new file mode 100644 index 0000000..6e3e28e --- /dev/null +++ b/PyroFetes/DTO/ProductEffect/Response/GetProductEffectDto.cs @@ -0,0 +1,12 @@ +namespace PyroFetes.DTO.ProductEffect.Response; + +// DTO utilisé pour renvoyer les informations d’un produit lié à un effet + +public class GetProductEffectDto +{ + // Identifiant du produit concerné + public int ProductId { get; set; } + + // Identifiant de l'effet + public int EffectId { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/Endpoints/Material/DeleteMaterialEndpoint.cs b/PyroFetes/Endpoints/Material/DeleteMaterialEndpoint.cs index 82aea59..6fbdd46 100644 --- a/PyroFetes/Endpoints/Material/DeleteMaterialEndpoint.cs +++ b/PyroFetes/Endpoints/Material/DeleteMaterialEndpoint.cs @@ -10,7 +10,7 @@ public class DeleteMaterialEndpoint(PyroFetesDbContext pyrofetesdbcontext) : End { public override void Configure() { - Delete("Api/materials/{@id}", x => new { x.Id }); + Delete("/materials/{@id}", x => new { x.Id }); AllowAnonymous(); }