MAJ ajout produit

This commit is contained in:
2026-04-13 15:09:28 +02:00
parent 94df917149
commit 260fe71d4f
4 changed files with 7 additions and 5 deletions

View File

@@ -46,5 +46,7 @@ namespace PyroFetes.DTO.Product.Request
// Liste des entrepôts liés au produit venant du DTO CreateProductWarehouseDto
public List<CreateProductWarehouseDto>? Warehouses { get; set; }
public int MovementId { get; set; }
}
}

View File

@@ -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);

View File

@@ -36,6 +36,5 @@ namespace PyroFetes.Models
public List<WarehouseProduct>? WarehouseProducts { get; set; }
public List<ProductTimecode>? ProductTimecodes { get; set; }
}
}

View File

@@ -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);