namespace WalletService.Domain.AggregatesModel.WalletAggregate;

using WalletService.Domain.SeedWork;

/// <summary>
/// EN: Transaction type enumeration
/// VI: Enumeration loại giao dịch
/// </summary>
public class TransactionType : Enumeration
{
    /// <summary>
    /// EN: Credit - money added to wallet
    /// VI: Ghi có - tiền được thêm vào ví
    /// </summary>
    public static TransactionType Credit = new(1, nameof(Credit));

    /// <summary>
    /// EN: Debit - money withdrawn from wallet
    /// VI: Ghi nợ - tiền được rút khỏi ví
    /// </summary>
    public static TransactionType Debit = new(2, nameof(Debit));

    /// <summary>
    /// EN: Transfer out - money sent to another wallet
    /// VI: Chuyển đi - tiền được gửi đến ví khác
    /// </summary>
    public static TransactionType TransferOut = new(3, nameof(TransferOut));

    /// <summary>
    /// EN: Transfer in - money received from another wallet
    /// VI: Chuyển đến - tiền được nhận từ ví khác
    /// </summary>
    public static TransactionType TransferIn = new(4, nameof(TransferIn));

    /// <summary>
    /// EN: Refund - money refunded to wallet
    /// VI: Hoàn tiền - tiền được hoàn lại vào ví
    /// </summary>
    public static TransactionType Refund = new(5, nameof(Refund));

    /// <summary>
    /// EN: Hold created - funds locked for escrow
    /// VI: Tạo hold - tiền bị khóa cho ký quỹ
    /// </summary>
    public static TransactionType HoldCreated = new(6, nameof(HoldCreated));

    /// <summary>
    /// EN: Hold executed - escrowed funds committed/paid out
    /// VI: Thực thi hold - tiền ký quỹ được cam kết/thanh toán
    /// </summary>
    public static TransactionType HoldExecuted = new(7, nameof(HoldExecuted));

    /// <summary>
    /// EN: Hold released - escrowed funds returned to wallet
    /// VI: Giải phóng hold - tiền ký quỹ được trả lại ví
    /// </summary>
    public static TransactionType HoldReleased = new(8, nameof(HoldReleased));

    protected TransactionType() : base(0, "Unknown") { }

    public TransactionType(int id, string name) : base(id, name) { }
}
