Api/NetinaShop.Domain/Dtos/LargDtos/OrderLDto.cs

40 lines
1.4 KiB
C#

namespace NetinaShop.Domain.Dtos.LargDtos;
public class OrderLDto : BaseDto<OrderLDto,Order>
{
public string FactorCode { get; set; } = string.Empty;
public long TotalPrice { get; set; }
public long DeliveryPrice { get; set; }
public long TaxesPrice { get; set; }
public long ServicePrice { get; set; }
public long PackingPrice { get; set; }
public long TotalProductsPrice { get; set; }
public long DiscountPrice { get; set; }
public bool IsPayed { get; set; }
public OrderStatus OrderStatus { get; set; }
public DateTime DoneAt { get; set; }
public DateTime OrderAt { get; set; }
public int PreparingMinute { get; set; }
public string DiscountCode { get; set; } = string.Empty;
public long TotalPriceWithoutDiscount => TotalPrice + DiscountPrice;
public string UserFullName { get; set; } = string.Empty;
public string UserPhoneNumber { get; set; } = string.Empty;
public List<OrderProductSDto> OrderProducts { get; set; } = new();
public List<OrderDeliverySDto> OrderDeliveries { get; set; } = new();
public List<PaymentSDto> Payments { get; set; } = new();
public OrderDeliverySDto OrderDelivery
{
get
{
if (OrderDeliveries.Count > 0)
return OrderDeliveries.FirstOrDefault() ?? new OrderDeliverySDto();
return new OrderDeliverySDto();
}
}
}