forked from sanchezvem/PyroFetes
Merge branch 'feature/matheo' into develop
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
namespace API.DTO.Product.Request;
|
using PyroFetes.Models;
|
||||||
|
|
||||||
|
namespace PyroFetes.DTO.Product.Request;
|
||||||
|
|
||||||
public class CreateProductDto
|
public class CreateProductDto
|
||||||
{
|
{
|
||||||
@@ -15,4 +17,9 @@ public class CreateProductDto
|
|||||||
|
|
||||||
public int ClassificationId { get; set;}
|
public int ClassificationId { get; set;}
|
||||||
public int ProductCategoryId { get; set; }
|
public int ProductCategoryId { get; set; }
|
||||||
|
public List<Brand>? Brands { get; set; }
|
||||||
|
public List<ProductEffect>? Effects { get; set; }
|
||||||
|
public List<ProductColor>? Colors {get; set;}
|
||||||
|
public List<Price>? Prices {get; set;}
|
||||||
|
public List<WarehouseProduct>? WarehouseProducts {get; set; }
|
||||||
}
|
}
|
@@ -1,4 +1,6 @@
|
|||||||
namespace API.DTO.Product.Request;
|
using PyroFetes.Models;
|
||||||
|
|
||||||
|
namespace PyroFetes.DTO.Product.Request;
|
||||||
|
|
||||||
public class UpdateProductDto
|
public class UpdateProductDto
|
||||||
{
|
{
|
||||||
@@ -15,4 +17,9 @@ public class UpdateProductDto
|
|||||||
public string? Link { get; set; }
|
public string? Link { get; set; }
|
||||||
public int ClassificationId { get; set;}
|
public int ClassificationId { get; set;}
|
||||||
public int ProductCategoryId { get; set; }
|
public int ProductCategoryId { get; set; }
|
||||||
|
public List<Brand>? Brands { get; set; }
|
||||||
|
public List<ProductEffect>? Effects { get; set; }
|
||||||
|
public List<ProductColor>? Colors {get; set;}
|
||||||
|
public List<Price>? Prices {get; set;}
|
||||||
|
public List<WarehouseProduct>? WarehouseProducts {get; set; }
|
||||||
}
|
}
|
@@ -1,4 +1,6 @@
|
|||||||
namespace API.DTO.Product.Response;
|
using PyroFetes.Models;
|
||||||
|
|
||||||
|
namespace PyroFetes.DTO.Product.Response;
|
||||||
|
|
||||||
public class GetProductDto
|
public class GetProductDto
|
||||||
{
|
{
|
||||||
@@ -17,4 +19,9 @@ public class GetProductDto
|
|||||||
public string? ClassificationLabel { get; set; }
|
public string? ClassificationLabel { get; set; }
|
||||||
public int ProductCategoryId { get; set; }
|
public int ProductCategoryId { get; set; }
|
||||||
public string? ProductCategoryLabel { get; set; }
|
public string? ProductCategoryLabel { get; set; }
|
||||||
|
public List<Brand>? Brands { get; set; }
|
||||||
|
public List<ProductEffect>? Effects { get; set; }
|
||||||
|
public List<ProductColor>? Colors {get; set;}
|
||||||
|
public List<Price>? Prices {get; set;}
|
||||||
|
public List<WarehouseProduct>? WarehouseProducts {get; set; }
|
||||||
}
|
}
|
@@ -1,6 +1,6 @@
|
|||||||
using API.DTO.Product.Request;
|
using FastEndpoints;
|
||||||
using API.DTO.Product.Response;
|
using PyroFetes.DTO.Product.Request;
|
||||||
using FastEndpoints;
|
using PyroFetes.DTO.Product.Response;
|
||||||
|
|
||||||
namespace PyroFetes.Endpoints.Product;
|
namespace PyroFetes.Endpoints.Product;
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
using API.DTO.Product.Response;
|
using FastEndpoints;
|
||||||
using FastEndpoints;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using PyroFetes.DTO.Product.Response;
|
||||||
|
|
||||||
namespace PyroFetes.Endpoints.Product;
|
namespace PyroFetes.Endpoints.Product;
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
using API.DTO.Product.Response;
|
using FastEndpoints;
|
||||||
using FastEndpoints;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using PyroFetes.DTO.Product.Response;
|
||||||
|
|
||||||
namespace PyroFetes.Endpoints.Product;
|
namespace PyroFetes.Endpoints.Product;
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
using API.DTO.Product.Request;
|
using FastEndpoints;
|
||||||
using API.DTO.Product.Response;
|
|
||||||
using FastEndpoints;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using PyroFetes.DTO.Product.Request;
|
||||||
|
using PyroFetes.DTO.Product.Response;
|
||||||
|
|
||||||
namespace PyroFetes.Endpoints.Product;
|
namespace PyroFetes.Endpoints.Product;
|
||||||
|
|
||||||
|
@@ -1,18 +1,19 @@
|
|||||||
var builder = WebApplication.CreateBuilder(args);
|
using API;
|
||||||
|
using FastEndpoints;
|
||||||
|
using FastEndpoints.Swagger;
|
||||||
|
using PyroFetes;
|
||||||
|
|
||||||
// Add services to the container.
|
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
|
||||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
|
||||||
builder.Services.AddEndpointsApiExplorer();
|
|
||||||
builder.Services.AddSwaggerGen();
|
|
||||||
|
|
||||||
var app = builder.Build();
|
// On ajoute ici FastEndpoints, un framework REPR et Swagger aux services disponibles dans le projet
|
||||||
|
builder.Services.AddFastEndpoints().SwaggerDocument();
|
||||||
|
|
||||||
// Configure the HTTP request pipeline.
|
// On ajoute ici la configuration de la base de données
|
||||||
if (app.Environment.IsDevelopment())
|
builder.Services.AddDbContext<PyroFetesDbContext>();
|
||||||
{
|
|
||||||
app.UseSwagger();
|
// On construit l'application en lui donnant vie
|
||||||
app.UseSwaggerUI();
|
WebApplication app = builder.Build();
|
||||||
}
|
app.UseFastEndpoints().UseSwaggerGen();
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user