From 25d1407bd22292a3074a7427334c42f1720e1571 Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Thu, 9 Oct 2025 17:54:28 +0200 Subject: [PATCH 1/2] Creating of all product dto --- .../DTO/Product/Request/CreateProductDto.cs | 16 ++++++++++++++++ .../Request/PatchProductMinimalStockDto.cs | 7 +++++++ .../DTO/Product/Request/UpdateProductDto.cs | 17 +++++++++++++++++ PyroFetes/DTO/Product/Response/GetProductDto.cs | 17 +++++++++++++++++ 4 files changed, 57 insertions(+) create mode 100644 PyroFetes/DTO/Product/Request/CreateProductDto.cs create mode 100644 PyroFetes/DTO/Product/Request/PatchProductMinimalStockDto.cs create mode 100644 PyroFetes/DTO/Product/Request/UpdateProductDto.cs create mode 100644 PyroFetes/DTO/Product/Response/GetProductDto.cs diff --git a/PyroFetes/DTO/Product/Request/CreateProductDto.cs b/PyroFetes/DTO/Product/Request/CreateProductDto.cs new file mode 100644 index 0000000..03ef300 --- /dev/null +++ b/PyroFetes/DTO/Product/Request/CreateProductDto.cs @@ -0,0 +1,16 @@ +namespace PyroFetes.DTO.Product.Request; + +public class CreateProductDto +{ + 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 string? Image { get; set; } + public string? Link { get; set; } + public int MinimalQuantity { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/Product/Request/PatchProductMinimalStockDto.cs b/PyroFetes/DTO/Product/Request/PatchProductMinimalStockDto.cs new file mode 100644 index 0000000..424f666 --- /dev/null +++ b/PyroFetes/DTO/Product/Request/PatchProductMinimalStockDto.cs @@ -0,0 +1,7 @@ +namespace PyroFetes.DTO.Product.Request; + +public class PatchProductMinimalStockDto +{ + public int Id { get; set; } + public int MinimalQuantity { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/Product/Request/UpdateProductDto.cs b/PyroFetes/DTO/Product/Request/UpdateProductDto.cs new file mode 100644 index 0000000..499602a --- /dev/null +++ b/PyroFetes/DTO/Product/Request/UpdateProductDto.cs @@ -0,0 +1,17 @@ +namespace PyroFetes.DTO.Product.Request; + +public class UpdateProductDto +{ + public int Id { 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 string? Image { get; set; } + public string? Link { get; set; } + public int MinimalQuantity { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/Product/Response/GetProductDto.cs b/PyroFetes/DTO/Product/Response/GetProductDto.cs new file mode 100644 index 0000000..bf69644 --- /dev/null +++ b/PyroFetes/DTO/Product/Response/GetProductDto.cs @@ -0,0 +1,17 @@ +namespace PyroFetes.DTO.Product.Response; + +public class GetProductDto +{ + public int Id { 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 string? Image { get; set; } + public string? Link { get; set; } + public int MinimalQuantity { get; set; } +} \ No newline at end of file From ddbd662c2a78cefac37fd2bac3287c71ea843531 Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Thu, 9 Oct 2025 19:02:09 +0100 Subject: [PATCH 2/2] fix an error in product attribute --- PyroFetes/DTO/Product/Request/CreateProductDto.cs | 1 - PyroFetes/DTO/Product/Request/UpdateProductDto.cs | 1 - PyroFetes/DTO/Product/Response/GetProductDto.cs | 1 - 3 files changed, 3 deletions(-) diff --git a/PyroFetes/DTO/Product/Request/CreateProductDto.cs b/PyroFetes/DTO/Product/Request/CreateProductDto.cs index 03ef300..24ecf17 100644 --- a/PyroFetes/DTO/Product/Request/CreateProductDto.cs +++ b/PyroFetes/DTO/Product/Request/CreateProductDto.cs @@ -9,7 +9,6 @@ public class CreateProductDto 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 MinimalQuantity { get; set; } diff --git a/PyroFetes/DTO/Product/Request/UpdateProductDto.cs b/PyroFetes/DTO/Product/Request/UpdateProductDto.cs index 499602a..0548119 100644 --- a/PyroFetes/DTO/Product/Request/UpdateProductDto.cs +++ b/PyroFetes/DTO/Product/Request/UpdateProductDto.cs @@ -10,7 +10,6 @@ public class UpdateProductDto 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 MinimalQuantity { get; set; } diff --git a/PyroFetes/DTO/Product/Response/GetProductDto.cs b/PyroFetes/DTO/Product/Response/GetProductDto.cs index bf69644..6781381 100644 --- a/PyroFetes/DTO/Product/Response/GetProductDto.cs +++ b/PyroFetes/DTO/Product/Response/GetProductDto.cs @@ -10,7 +10,6 @@ public class GetProductDto 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 MinimalQuantity { get; set; }