Creating DTO of ProductDelivery with flattening

This commit is contained in:
Cristiano
2025-10-11 01:29:02 +02:00
parent 0209dbfc20
commit ecd8883d55
6 changed files with 46 additions and 2 deletions

View File

@@ -10,5 +10,4 @@ public class CreateDeliveryNoteDto
public int DeliverId { get; set; }
public string? DeliverTransporter { get; set; }
public List<GetProductDeliveryDto> Products { get; set; }
}

View File

@@ -11,5 +11,4 @@ public class UpdateDeliveryNoteDto
public int DeliverId { get; set; }
public string? DeliverTransporter { get; set; }
public List<GetProductDeliveryDto> Products { get; set; }
}

View File

@@ -1,3 +1,5 @@
using PyroFetes.DTO.ProductDelivery.Response;
namespace PyroFetes.DTO.DeliveryNote.Response;
public class GetDeliveryNoteDto

View File

@@ -0,0 +1,8 @@
namespace PyroFetes.DTO.ProductDelivery.Request;
public class CreateProductDeliveryDto
{
public int ProductId { get; set; }
public int DeliveryNoteId { get; set; }
public int Quantity { get; set; }
}

View File

@@ -0,0 +1,8 @@
namespace PyroFetes.DTO.ProductDelivery.Request;
public class UpdateProductDeliveryDto
{
public int Quantity { get; set; }
public int ProductId { get; set; }
public int DeliveryNoteId { get; set; }
}

View File

@@ -0,0 +1,28 @@
namespace PyroFetes.DTO.ProductDelivery.Response;
public class GetProductDeliveryDto
{
public int ProductId { get; set; }
public int ProductReference { get; set; }
public string? ProductName { get; set; }
public decimal ProductDuration {get; set;}
public decimal ProductCaliber { get; set; }
public int ProductApprovalNumber { get; set; }
public decimal ProductWeight { get; set; }
public decimal ProductNec { get; set; }
public string? ProductImage { get; set; }
public string? ProductLink { get; set; }
public int ProductMinimalQuantity { get; set; }
public int DeliveryNoteId { get; set; }
public string? DeliveryNoteTrackingNumber { get; set; }
public DateOnly DeliveryNoteEstimateDeliveryDate { get; set; }
public DateOnly DeliveryNoteExpeditionDate { get; set; }
public DateOnly? DeliveryNoteRealDeliveryDate { get; set; }
public int DeliveryNoteDeliverId { get; set; }
public string? DeliveryNoteDeliverTransporter { get; set; }
public int Quantity { get; set; }
}