82 lines
2.9 KiB
C#
82 lines
2.9 KiB
C#
using Netina.Domain.Entities.Accounting;
|
|
|
|
namespace Netina.Domain.Entities.Orders;
|
|
|
|
[AdaptTwoWays("[name]LDto", IgnoreAttributes = [typeof(AdaptIgnoreAttribute)], MapType = MapType.Map | MapType.MapToTarget | MapType.Projection)]
|
|
[AdaptTwoWays("[name]SDto", IgnoreAttributes = [typeof(AdaptIgnoreAttribute)], MapType = MapType.Map | MapType.MapToTarget)]
|
|
[AdaptTo("[name]SDto", IgnoreAttributes = [typeof(AdaptIgnoreAttribute)], MapType = MapType.Projection)]
|
|
[GenerateMapper]
|
|
|
|
public partial class Order : ApiEntity
|
|
{
|
|
public Order()
|
|
{
|
|
|
|
}
|
|
public Order(
|
|
string factorCode,
|
|
double totalPrice,
|
|
double deliveryPrice,
|
|
double taxesPrice,
|
|
double servicePrice,
|
|
double packingPrice,
|
|
double totalProductsPrice,
|
|
double discountPrice,
|
|
bool isPayed,
|
|
OrderStatus orderStatus,
|
|
DateTime doneAt,
|
|
DateTime orderAt,
|
|
int preparingMinute,
|
|
string discountCode,
|
|
Guid customerId,
|
|
OrderPaymentMethod paymentMethod)
|
|
{
|
|
FactorCode = factorCode;
|
|
TotalPrice = totalPrice;
|
|
DeliveryPrice = deliveryPrice;
|
|
TaxesPrice = taxesPrice;
|
|
ServicePrice = servicePrice;
|
|
PackingPrice = packingPrice;
|
|
TotalProductsPrice = totalProductsPrice;
|
|
DiscountPrice = discountPrice;
|
|
IsPayed = isPayed;
|
|
OrderStatus = orderStatus;
|
|
DoneAt = doneAt;
|
|
OrderAt = orderAt;
|
|
PreparingMinute = preparingMinute;
|
|
DiscountCode = discountCode;
|
|
CustomerId = customerId;
|
|
PaymentMethod = paymentMethod;
|
|
}
|
|
|
|
public string FactorCode { get; internal set; } = string.Empty;
|
|
public double TotalProductsPrice { get; internal set; }
|
|
public double PackingPrice { get; internal set; }
|
|
public double ServicePrice { get; internal set; }
|
|
public double DeliveryPrice { get; internal set; }
|
|
public double DiscountPrice { get; internal set; }
|
|
public double DiscountCodePrice { get; internal set; }
|
|
public double ProductDiscountPrice { get; internal set; }
|
|
public double TaxesPrice { get; internal set; }
|
|
public double TotalPrice { get; internal set; }
|
|
public bool IsPayed { get; internal set; }
|
|
public OrderPaymentMethod PaymentMethod { get; internal set; }
|
|
public OrderStatus OrderStatus { get; internal set; }
|
|
|
|
public DateTime DeliveredAt { get; internal set; }
|
|
public DateTime DoneAt { get; internal set; }
|
|
public DateTime OrderAt { get; internal set; }
|
|
public DateTime PayedAt { get; internal set; }
|
|
public int PreparingMinute { get; internal set; }
|
|
public string DiscountCode { get; internal set; } = string.Empty;
|
|
|
|
public Guid CustomerId { get; internal set; }
|
|
public Customer? Customer { get; internal set; }
|
|
|
|
public OrderDelivery? OrderDelivery { get; set; }
|
|
|
|
public List<OrderProduct> OrderProducts { get; internal set; } = [];
|
|
|
|
|
|
public List<Payment> Payments { get; internal set; } = [];
|
|
} |