using Lada.Framework.Data.Enums;
using static Lada.Framework.Data.Enums.OrderFinEnum;

namespace Ladaer.BackEnd.Infrastructures.DTO.Models.Monitor
{
    public class OrderRiskSearchParam
    {
        public DateTime? FromDate { get; set; }
        public DateTime? ToDate { get; set; }
        public int PageNumber { get; set; } = 1;
        public int PageSize { get; set; } = 50;
    }

    public class OrderRiskResult
    {
        public int TotalRecords { get; set; }
        public int PageNumber { get; set; }
        public int PageSize { get; set; }
        public int TotalPages { get; set; }
        public List<OrderRiskItem> Orders { get; set; } = new List<OrderRiskItem>();
        public RiskInfo RiskInfo { get; set; } = new RiskInfo();
    }

    public class OrderRiskItem
    {
        public int Id { get; set; }
        public string Code { get; set; } = string.Empty;
        public DateTimeOffset CreatedTime { get; set; }
        public int CustomerId { get; set; }
        public PayFeeType PayFeeType { get; set; }
        public OrderStatus Status { get; set; }
        public OrderPhysicalStatus PhysicalStatus { get; set; }
        public decimal SourceFee { get; set; }
        public decimal DestFee { get; set; }
        public decimal TotalFee { get; set; }
        public int? SourceFeeCashierId { get; set; }
        public string? SourceFeeCashierUsername { get; set; }
        public OrderFeeStage SourceFeeStage { get; set; }
        public int? DestFeeCashierId { get; set; }
        public string? DestFeeCashierUsername { get; set; }
        public OrderFeeStage DestFeeStage { get; set; }
        public string? CustomerName { get; set; }
        public string? CustomerPhone { get; set; }
        public string? SenderName { get; set; }
        public string? SenderPhone { get; set; }
        public string? SenderAddress { get; set; }
        public string? ReceiverName { get; set; }
        public string? ReceiverPhone { get; set; }
        public string? ReceiverAddress { get; set; }
    }

    public class RiskInfo
    {
        public string Code { get; set; } = string.Empty;
        public string Name { get; set; } = string.Empty;
        public string Description { get; set; } = string.Empty;
        public string Severity { get; set; } = string.Empty;
        public string Solution { get; set; } = string.Empty;
    }

    public class OrderRiskOverview
    {
        public int TotalOrders { get; set; }
        public decimal TotalSourceFee { get; set; }
        public decimal TotalDestFee { get; set; }
        public decimal TotalFee { get; set; }
        public RiskInfo RiskInfo { get; set; } = new RiskInfo();
    }
}
