namespace NetinaShop.Domain.Entities.Orders;

[AdaptTwoWays("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Map | MapType.MapToTarget)]
[AdaptTo("[name]SDto", IgnoreAttributes = new[] { typeof(AdaptIgnoreAttribute) }, MapType = MapType.Projection)]
[GenerateMapper]
public partial class OrderProduct : ApiEntity
{
    public OrderProduct()
    {

    }
    public OrderProduct(int count, 
        double productFee, 
        double productFeeWithDiscount,
        bool hasDiscount,
        double productCost, 
        double packingFee, 
        double packingCost, 
        OrderStatus orderProductStatus, 
        Guid productId,
        Guid productCategoryId, 
        Guid orderId)
    {
        Count = count;
        ProductFee = productFee;
        ProductFeeWithDiscount = productFeeWithDiscount;
        HasDiscount = hasDiscount;
        ProductCost = productCost;
        OrderProductStatus = orderProductStatus;
        ProductId = productId;
        OrderId = orderId;
        ProductCategoryId = productCategoryId;
        PackingFee = packingFee;
        PackingCost = packingCost;
    }
    public int Count { get; internal set; }
    public double ProductFee { get; internal set; }
    public double ProductFeeWithDiscount { get; internal set; }
    public bool HasDiscount { get; internal set; }
    public double ProductCost { get; internal set; }
    public double PackingFee { get; internal set; }
    public double PackingCost { get; internal set; }
    public OrderStatus OrderProductStatus { get; internal set; }

    public Guid ProductId { get; internal set; }
    public Guid ProductCategoryId { get; internal set; }
    public Product? Product { get; internal set; }

    public Guid OrderId { get; internal set; }
    public Order? Order { get; internal set; }
}