Ajout de Login et du model réuni avec tout les autres Sujet

This commit is contained in:
2025-10-16 16:30:17 +02:00
parent b3347fe163
commit 2112605cf3
20 changed files with 340 additions and 36 deletions

View File

@@ -2,8 +2,6 @@
using PyroFetes.DTO.Product.Response;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
using PyroFetes.DTO.Product.Request;
using PyroFetes.DTO.Product.Response;
using PyroFetes.Models;
namespace PyroFetes.Endpoints.Product;
@@ -21,14 +19,13 @@ public class CreateProductEndpoint(PyroFetesDbContext db)
{
var product = new Models.Product
{
References = req.References,
Reference = req.References.ToString(),
Name = req.Name!,
Duration = req.Duration,
Caliber = req.Caliber,
ApprovalNumber = req.ApprovalNumber,
Weight = req.Weight,
Nec = req.Nec,
SellingPrice = req.SellingPrice,
Image = req.Image!,
Link = req.Link!,
ProductCategoryId = req.ProductCategoryId,