using Lada.Framework.DTO;
using Lada.Framework.Infrastructures.Helpers;
using static Lada.Framework.Data.Enums.OrderFinEnum;

namespace Ladaer.BackEnd.Infrastructures.DTO.Items.Orders
{
    public class OrderFinItem : BaseItem<int>
    {
        public int ChargeWeight { get; set; }
        public int SourceFeeCashierId { get; set; }
        public int DestFeeCashierId { get; set; }
        public decimal CollectAmount { get; set; }
        public bool CodIncludeFee { get; set; } = true;
        public PayFeeType PayFeeType { get; set; }
        public string PayFeeTypeStr => PayFeeType.GetDescription();
        public decimal Fee { get; set; }
        public decimal Discount { get; set; }
        public decimal CodFee { get; set; }
        public decimal TotalFee => Fee + CodFee + PickupSubFee + DeliverySubFee - Discount;
        public decimal SourceFee { get; set; }
        public decimal DestFee { get; set; }
        public decimal ReturnFee { get; set; }
        public decimal InsuranceFee { get; set; }
        public decimal PickupSubFee { get; set; }
        public decimal DeliverySubFee { get; set; }

        public string SourceFeeStage { get; set; } = string.Empty;
        public string DestFeeStage { get; set; } = string.Empty;

        /// <summary>
        /// Tiền đối soát dựa trên PayFeeType
        /// </summary>
        public decimal ReconciliationAmount { get; set; }
    }
}
