Compare commits
3 Commits
9aac7c39f2
...
d26284d552
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d26284d552 | ||
|
|
d537051bea | ||
|
|
3ad506f869 |
@@ -17,8 +17,8 @@ public class CreatePriceDto
|
|||||||
public string? ProductReferences { get; set; }
|
public string? ProductReferences { get; set; }
|
||||||
public string? ProductName { get; set; }
|
public string? ProductName { get; set; }
|
||||||
public decimal ProductDuration {get; set;}
|
public decimal ProductDuration {get; set;}
|
||||||
public decimal ProductCaliber { get; set; }
|
public int ProductCaliber { get; set; }
|
||||||
public int ProductApprovalNumber { get; set; }
|
public string? ProductApprovalNumber { get; set; }
|
||||||
public decimal ProductWeight { get; set; }
|
public decimal ProductWeight { get; set; }
|
||||||
public decimal ProductNec { get; set; }
|
public decimal ProductNec { get; set; }
|
||||||
public string? ProductImage { get; set; }
|
public string? ProductImage { get; set; }
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ public class CreateProductDto
|
|||||||
public string? References { get; set; }
|
public string? References { get; set; }
|
||||||
public string? Name { get; set; }
|
public string? Name { get; set; }
|
||||||
public decimal Duration {get; set;}
|
public decimal Duration {get; set;}
|
||||||
public decimal Caliber { get; set; }
|
public int Caliber { get; set; }
|
||||||
public int ApprovalNumber { get; set; }
|
public string? ApprovalNumber { get; set; }
|
||||||
public decimal Weight { get; set; }
|
public decimal Weight { get; set; }
|
||||||
public decimal Nec { get; set; }
|
public decimal Nec { get; set; }
|
||||||
public string? Image { get; set; }
|
public string? Image { get; set; }
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ public class UpdateProductDto
|
|||||||
public string? References { get; set; }
|
public string? References { get; set; }
|
||||||
public string? Name { get; set; }
|
public string? Name { get; set; }
|
||||||
public decimal Duration {get; set;}
|
public decimal Duration {get; set;}
|
||||||
public decimal Caliber { get; set; }
|
public int Caliber { get; set; }
|
||||||
public int ApprovalNumber { get; set; }
|
public string? ApprovalNumber { get; set; }
|
||||||
public decimal Weight { get; set; }
|
public decimal Weight { get; set; }
|
||||||
public decimal Nec { get; set; }
|
public decimal Nec { get; set; }
|
||||||
public string? Image { get; set; }
|
public string? Image { get; set; }
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ public class GetProductDto
|
|||||||
public string? References { get; set; }
|
public string? References { get; set; }
|
||||||
public string? Name { get; set; }
|
public string? Name { get; set; }
|
||||||
public decimal Duration {get; set;}
|
public decimal Duration {get; set;}
|
||||||
public decimal Caliber { get; set; }
|
public int Caliber { get; set; }
|
||||||
public int ApprovalNumber { get; set; }
|
public string? ApprovalNumber { get; set; }
|
||||||
public decimal Weight { get; set; }
|
public decimal Weight { get; set; }
|
||||||
public decimal Nec { get; set; }
|
public decimal Nec { get; set; }
|
||||||
public string? Image { get; set; }
|
public string? Image { get; set; }
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public class CreateDelivererEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Post("api/deliverers");
|
Post("/deliverers");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class DeleteDelivererEndpoint(DeliverersRepository deliverersRepository)
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Delete("api/deliverers/{@id}", x=>new {x.DelivererId});
|
Delete("/deliverers/{@id}", x=>new {x.DelivererId});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ public class GetAllDelivererEndpoint(DeliverersRepository deliverersRepository)
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Get("api/deliverers");
|
Get("/deliverers");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class GetDelivererEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Get("api/deliverers/{@id}", x=>new {x.DelivererId});
|
Get("/deliverers/{@id}", x=>new {x.DelivererId});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class UpdateDelivererEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Put("api/deliverers/{@id}", x=>new {x.Id});
|
Put("/deliverers/{@id}", x=>new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class CreateDeliveryNoteEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Post("/api/DeliveryNote");
|
Post("/deliveryNotes");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public class GetAllDeliveryNoteEndpoint(DeliveryNotesRepository deliveryNotesRep
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Get("api/deliveryNotes");
|
Get("/deliveryNotes");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class GetDeliveryNoteEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Get("/api/deliveryNote/{@id}", x=> new {x.DeliveryNoteId});
|
Get("/deliveryNotes/{@id}", x=> new {x.DeliveryNoteId});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class PatchRealDeliveryDateEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Patch("/api/deliveryNote/{@id}", x=> new {x.Id});
|
Patch("/deliveryNotes/{@id}", x=> new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class CreatePriceEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Post("/api/prices");
|
Post("/prices");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class DeletePriceEndpoint(PricesRepository pricesRepository) : Endpoint<D
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Delete("/api/prices/{@ProductId}/{@SupplierId}", x => new {x.ProductId, x.SupplierId});
|
Delete("/prices/{@ProductId}/{@SupplierId}", x => new {x.ProductId, x.SupplierId});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class PatchPriceEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Patch("/api/prices/{@ProductId}/{@SupplierId}/SellingPrice", x => new { x.ProductId, x.SupplierId });
|
Patch("/prices/{@ProductId}/{@SupplierId}/SellingPrice", x => new { x.ProductId, x.SupplierId });
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ public class GetAllProductsEndpoint(ProductsRepository productsRepository) : End
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Get("/api/products");
|
Get("/products");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class GetProductEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Get("/api/products/{@Id}", x => new {x.Id});
|
Get("/products/{@Id}", x => new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class PatchProductMinimalStockEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Patch("/api/products/{@Id}/MinimalStock", x => new { x.Id });
|
Patch("/products/{@Id}/MinimalStock", x => new { x.Id });
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class UpdateProductEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Put("/api/products/{@Id}", x => new {x.Id});
|
Put("/products/{@Id}", x => new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class DeletePurchaseOrderEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Delete("/api/purchaseOrders/{@Id}", x => new {x.Id});
|
Delete("/purchaseOrders/{@Id}", x => new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ public class GetAllPurchaseOrderEndpoint(PurchaseOrdersRepository purchaseOrders
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Get("/api/purchaseOrders");
|
Get("/purchaseOrders");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class GetPurchaseOrderEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Get("/api/purchaseOrders/{@Id}", x => new {x.Id});
|
Get("/purchaseOrders/{@Id}", x => new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class PatchPurchaseOrderPurchaseConditionsEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Patch("/api/purchaseOrders/{@Id}/PurchaseConditions", x => new { x.Id });
|
Patch("/purchaseOrders/{@Id}/PurchaseConditions", x => new { x.Id });
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class CreatePurchaseProductEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Post("/api/purchaseProducts");
|
Post("/purchaseProducts");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class DeletePurchaseProductEndpoint(PurchaseProductsRepository purchasePr
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Delete("/api/purchaseProducts/{@ProductId}/{@PurchaseOrderId}", x => new {x.ProductId, x.PurchaseOrderId});
|
Delete("/purchaseProducts/{@ProductId}/{@PurchaseOrderId}", x => new {x.ProductId, x.PurchaseOrderId});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class PatchPurchaseProductQuantityEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Patch("/api/purchaseProducts/{@ProductId}/{@PurchaseOrderId}/Quantity", x => new { x.ProductId, x.PurchaseOrderId });
|
Patch("/purchaseProducts/{@ProductId}/{@PurchaseOrderId}/Quantity", x => new { x.ProductId, x.PurchaseOrderId });
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class CreateQuotationProductEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Post("/api/quotationProduct");
|
Post("/quotationProducts");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class DeleteQuotationProductEndpoint(QuotationProductsRepository quotatio
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Delete("/api/quotationProduct/{@ProductId}/{@QuotationId}", x => new {x.ProductId, x.QuotationId});
|
Delete("/quotationProducts/{@ProductId}/{@QuotationId}", x => new {x.ProductId, x.QuotationId});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class PatchQuotationProductQuantityEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Patch("/api/quotationProduct/{@ProductId}/{@QuotationId}/Quantity", x => new { x.ProductId, x.QuotationId });
|
Patch("/quotationProducts/{@ProductId}/{@QuotationId}/Quantity", x => new { x.ProductId, x.QuotationId });
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class DeleteQuotationEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Delete("/api/quotations/{@Id}", x => new {x.Id});
|
Delete("/quotations/{@Id}", x => new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ public class GetAllQuotationEndpoint(QuotationsRepository quotationsRepository)
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Get("/api/quotations");
|
Get("/quotations");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class GetQuotationEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Get("/api/quotations/{@Id}", x => new {x.Id});
|
Get("/quotations/{@Id}", x => new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class PatchQuotationConditionsSaleEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Patch("/api/quotations/{@Id}/ConditionsSale", x => new { x.Id });
|
Patch("/quotations/{@Id}/saleConditions", x => new { x.Id });
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public class CreateSettingEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Post("/api/setting");
|
Post("/settings");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class DeleteSettingEndpoint(SettingsRepository settingsRepository) : Endp
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Delete("/api/setting/{@Id}", x => new {x.Id});
|
Delete("/settings/{@Id}", x => new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class GetSettingEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Get("/api/setting/{@Id}", x => new {x.Id});
|
Get("/settings/{@Id}", x => new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class PatchSettingElectronicSignatureEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Patch("/api/setting/{@Id}/ElectronicSignature", x => new {x.Id});
|
Patch("/settings/{@Id}/ElectronicSignature", x => new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class PatchSettingLogoEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Patch("/api/setting/{@Id}/Logo", x => new {x.Id});
|
Patch("/settings/{@Id}/logo", x => new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public class CreateSupplierEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Post("/api/suppliers");
|
Post("/suppliers");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class DeleteSupplierEndpoint(SuppliersRepository suppliersRepository) : E
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Delete("/api/suppliers/{@Id}", x => new {x.Id});
|
Delete("/suppliers/{@Id}", x => new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ public class GetAllSuppliersEndpoint(SuppliersRepository suppliersRepository) :
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Get("/api/suppliers");
|
Get("/suppliers");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class GetSupplierEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Get("/api/suppliers/{@Id}", x => new {x.Id});
|
Get("/suppliers/{@Id}", x => new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ using PyroFetes.Specifications.Suppliers;
|
|||||||
|
|
||||||
namespace PyroFetes.Endpoints.Suppliers;
|
namespace PyroFetes.Endpoints.Suppliers;
|
||||||
|
|
||||||
public class PatchSupplierDeleveryDelayEndpoint(
|
public class PatchSupplierDeliveryDelayEndpoint(
|
||||||
SuppliersRepository suppliersRepository,
|
SuppliersRepository suppliersRepository,
|
||||||
AutoMapper.IMapper mapper) : Endpoint<PatchSupplierDeliveryDelayDto, GetSupplierDto>
|
AutoMapper.IMapper mapper) : Endpoint<PatchSupplierDeliveryDelayDto, GetSupplierDto>
|
||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Patch("/api/supplier/{@Id}/DeleveryDalay", x => new {x.Id});
|
Patch("/suppliers/{@Id}/deliveryDelay", x => new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ public class UpdateSupplierEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Put("/api/suppliers/{@Id}", x => new {x.Id});
|
Put("/suppliers/{@Id}", x => new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class ConnectUserEndpoint(UsersRepository usersRepository) : Endpoint<Con
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Post("/api/users/connect");
|
Post("/users/connection");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class CreateUserEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Post("/api/users");
|
Post("/users");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class DeleteUserEndpoint(UsersRepository usersRepository) : Endpoint<Dele
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Delete("/api/users/{@Id}", x => new {x.Id});
|
Delete("/users/{@Id}", x => new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ public class GetAllUsersEndpoint(UsersRepository usersRepository) : EndpointWith
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Get("/api/users");
|
Get("/users");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class GetUserEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Get("/api/users/{@Id}", x => new {x.Id});
|
Get("/users/{@Id}", x => new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class PatchUserPasswordEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Patch("/api/users/{@Id}/Password", x => new { x.Id });
|
Patch("/users/{@Id}/password", x => new { x.Id });
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class UpdateUserEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Put("/api/users/{@Id}", x => new {x.Id});
|
Put("/users/{@Id}", x => new {x.Id});
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class GetTotalQuantityEndpoint(
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Get("/api/wareHouseProduct/{@ProductId}", x => new { x.ProductId });
|
Get("/wareHouseProducts/{@ProductId}", x => new { x.ProductId });
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,17 +6,21 @@ using PyroFetes.Models;
|
|||||||
|
|
||||||
namespace PyroFetes.Endpoints.WareHouseProducts;
|
namespace PyroFetes.Endpoints.WareHouseProducts;
|
||||||
|
|
||||||
public class PatchWareHouseProductQuantityEndpoint(PyroFetesDbContext database) : Endpoint<PatchWareHouseProductQuantityDto, GetWareHouseProductDto>
|
public class PatchWareHouseProductQuantityEndpoint(PyroFetesDbContext database)
|
||||||
|
: Endpoint<PatchWareHouseProductQuantityDto, GetWareHouseProductDto>
|
||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Patch("/api/wareHouseProduct/{@ProductId}/{@WareHouseId}/Quantity", x => new { x.ProductId, x.WareHouseId });
|
Patch("/wareHouseProducts/{@ProductId}/{@WareHouseId}/quantity", x => new { x.ProductId, x.WareHouseId });
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async Task HandleAsync(PatchWareHouseProductQuantityDto req, CancellationToken ct)
|
public override async Task HandleAsync(PatchWareHouseProductQuantityDto req, CancellationToken ct)
|
||||||
{
|
{
|
||||||
WarehouseProduct? wareHouseProduct = await database.WarehouseProducts.SingleOrDefaultAsync(wp => wp.ProductId == req.ProductId && wp.WarehouseId == req.WareHouseId, ct);
|
WarehouseProduct? wareHouseProduct =
|
||||||
|
await database.WarehouseProducts.SingleOrDefaultAsync(
|
||||||
|
wp => wp.ProductId == req.ProductId && wp.WarehouseId == req.WareHouseId, ct);
|
||||||
|
|
||||||
if (wareHouseProduct == null)
|
if (wareHouseProduct == null)
|
||||||
{
|
{
|
||||||
await Send.NotFoundAsync(ct);
|
await Send.NotFoundAsync(ct);
|
||||||
|
|||||||
1966
PyroFetes/Migrations/20251120154429_FixTypeErrors.Designer.cs
generated
Normal file
1966
PyroFetes/Migrations/20251120154429_FixTypeErrors.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
68
PyroFetes/Migrations/20251120154429_FixTypeErrors.cs
Normal file
68
PyroFetes/Migrations/20251120154429_FixTypeErrors.cs
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace PyroFetes.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class FixTypeErrors : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "ZipCode",
|
||||||
|
table: "Suppliers",
|
||||||
|
type: "nvarchar(5)",
|
||||||
|
maxLength: 5,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(int),
|
||||||
|
oldType: "int");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "Caliber",
|
||||||
|
table: "Products",
|
||||||
|
type: "int",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(decimal),
|
||||||
|
oldType: "decimal(18,2)");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "ApprovalNumber",
|
||||||
|
table: "Products",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(int),
|
||||||
|
oldType: "int");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "ZipCode",
|
||||||
|
table: "Suppliers",
|
||||||
|
type: "int",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "nvarchar(5)",
|
||||||
|
oldMaxLength: 5);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<decimal>(
|
||||||
|
name: "Caliber",
|
||||||
|
table: "Products",
|
||||||
|
type: "decimal(18,2)",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(int),
|
||||||
|
oldType: "int");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "ApprovalNumber",
|
||||||
|
table: "Products",
|
||||||
|
type: "int",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "nvarchar(max)");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -503,11 +503,12 @@ namespace PyroFetes.Migrations
|
|||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int>("ApprovalNumber")
|
b.Property<string>("ApprovalNumber")
|
||||||
.HasColumnType("int");
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<decimal>("Caliber")
|
b.Property<int>("Caliber")
|
||||||
.HasColumnType("decimal(18,2)");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int>("ClassificationId")
|
b.Property<int>("ClassificationId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
@@ -1113,8 +1114,10 @@ namespace PyroFetes.Migrations
|
|||||||
.HasMaxLength(30)
|
.HasMaxLength(30)
|
||||||
.HasColumnType("nvarchar(30)");
|
.HasColumnType("nvarchar(30)");
|
||||||
|
|
||||||
b.Property<int>("ZipCode")
|
b.Property<string>("ZipCode")
|
||||||
.HasColumnType("int");
|
.IsRequired()
|
||||||
|
.HasMaxLength(5)
|
||||||
|
.HasColumnType("nvarchar(5)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ namespace PyroFetes.Models
|
|||||||
[Required, MaxLength(20)] public string? Reference { get; set; }
|
[Required, MaxLength(20)] public string? Reference { get; set; }
|
||||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||||
[Required] public decimal Duration {get; set;}
|
[Required] public decimal Duration {get; set;}
|
||||||
[Required] public decimal Caliber { get; set; }
|
[Required] public int Caliber { get; set; }
|
||||||
[Required] public int ApprovalNumber { get; set; }
|
[Required] public string? ApprovalNumber { get; set; }
|
||||||
[Required] public decimal Weight { get; set; }
|
[Required] public decimal Weight { get; set; }
|
||||||
[Required] public decimal Nec { get; set; }
|
[Required] public decimal Nec { get; set; }
|
||||||
[Required] public string? Image { get; set; }
|
[Required] public string? Image { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user