MAJ update movement

This commit is contained in:
2026-04-21 10:27:00 +02:00
parent 2af5c1e015
commit 1dcb3c35f2
9 changed files with 66 additions and 38 deletions

View File

@@ -1,6 +1,7 @@
using API.DTO.Movement.Request;
using API.DTO.Movement.Response;
using FastEndpoints;
using PyroFetes.DTO.Movement.Request;
namespace PyroFetes.Endpoints.Movement;
@@ -17,9 +18,11 @@ public class CreateMovementEndpoint(PyroFetesDbContext pyrofetesdbcontext) : End
Models.Movement movement = new ()
{
Date = req.Date,
ProductId = req.ProductId,
Start = req.Start,
Arrival = req.Arrival,
Quantity = req.Quantity
Quantity = req.Quantity,
Type = req.Type,
};
pyrofetesdbcontext.Movements.Add(movement);

View File

@@ -29,7 +29,6 @@ public class CreateProductEndpoint(PyroFetesDbContext db)
Link = req.Link!,
ProductCategoryId = req.ProductCategoryId,
ClassificationId = req.ClassificationId,
MovementId = req.MovementId
};
db.Products.Add(product);