From 260fe71d4f6336a66a8d6f197c98d2ab5f450593 Mon Sep 17 00:00:00 2001 From: colesm Date: Mon, 13 Apr 2026 15:09:28 +0200 Subject: [PATCH] MAJ ajout produit --- PyroFetes/DTO/Product/Request/CreateProductDto.cs | 2 ++ PyroFetes/Endpoints/Product/CreateProductEndpoint.cs | 3 ++- PyroFetes/Models/Product.cs | 1 - PyroFetes/PyroFetesDbContext.cs | 6 +++--- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/PyroFetes/DTO/Product/Request/CreateProductDto.cs b/PyroFetes/DTO/Product/Request/CreateProductDto.cs index c85c545c..6d67cecd 100644 --- a/PyroFetes/DTO/Product/Request/CreateProductDto.cs +++ b/PyroFetes/DTO/Product/Request/CreateProductDto.cs @@ -46,5 +46,7 @@ namespace PyroFetes.DTO.Product.Request // Liste des entrepôts liés au produit venant du DTO CreateProductWarehouseDto public List? Warehouses { get; set; } + + public int MovementId { get; set; } } } \ No newline at end of file diff --git a/PyroFetes/Endpoints/Product/CreateProductEndpoint.cs b/PyroFetes/Endpoints/Product/CreateProductEndpoint.cs index eb07c73d..de6ea723 100644 --- a/PyroFetes/Endpoints/Product/CreateProductEndpoint.cs +++ b/PyroFetes/Endpoints/Product/CreateProductEndpoint.cs @@ -28,7 +28,8 @@ public class CreateProductEndpoint(PyroFetesDbContext db) Image = req.Image!, Link = req.Link!, ProductCategoryId = req.ProductCategoryId, - ClassificationId = req.ClassificationId + ClassificationId = req.ClassificationId, + MovementId = req.MovementId }; db.Products.Add(product); diff --git a/PyroFetes/Models/Product.cs b/PyroFetes/Models/Product.cs index 88f52e47..ec603601 100644 --- a/PyroFetes/Models/Product.cs +++ b/PyroFetes/Models/Product.cs @@ -36,6 +36,5 @@ namespace PyroFetes.Models public List? WarehouseProducts { get; set; } public List? ProductTimecodes { get; set; } - } } \ No newline at end of file diff --git a/PyroFetes/PyroFetesDbContext.cs b/PyroFetes/PyroFetesDbContext.cs index b5ce8c70..35f25bb0 100644 --- a/PyroFetes/PyroFetesDbContext.cs +++ b/PyroFetes/PyroFetesDbContext.cs @@ -55,9 +55,9 @@ public class PyroFetesDbContext : DbContext { string connectionString = "Server=romaric-thibault.fr;" + - "Database=PyroFetes;" + - "User Id=pyrofetes;" + - "Password=Crablike8-Fringe-Swimmable;" + + "Database=Pyromana;" + + "User Id=matheo;" + + "Password=Onto9-Cage-Afflicted;" + "TrustServerCertificate=true;"; optionsBuilder.UseSqlServer(connectionString);