using Domain.Entities.Wallets.ValueObject;

namespace Application.Features.Admin.Member.Wallet.Transactions.Search;

public sealed class Response
{
    public int Total { get; init; }
    public int TotalCharge { get; init; }
    public int TotalDonationIn { get; init; }
    public int TotalDonationOut { get; init; }
    public int TotalRewardEarned { get; init; }
    public int TotalSpend { get; init; }
    public int TotalRefund { get; init; }
    public int TotalLock { get; init; }
    public int TotalUnlock { get; init; }
    public int TotalAdjusted { get; init; }

    public required IReadOnlyList<Row> List { get; init; }

    public sealed class Row
    {
        public int Num { get; init; }
        public int ID { get; init; }
        public Guid WalletKey { get; init; }
        public int MemberID { get; init; }
        public required string MemberEmail { get; init; }
        public string? MemberName { get; init; }
        public WalletTransactionType TxType { get; init; }
        public WalletBalanceType BalanceType { get; init; }
        public long Amount { get; init; }
        public long BalanceAfter { get; init; }
        public required string Reason { get; init; }
        public string? RefID { get; init; }
        public string? Memo { get; init; }
        public DateTime CreatedAt { get; init; }
    }
}