namespace WalletService.API.Application.Commands;

using MediatR;

#region Admin Wallet Commands

/// <summary>
/// EN: Command to freeze a wallet (Admin only).
/// VI: Command để đóng băng ví (Chỉ Admin).
/// </summary>
public record AdminFreezeWalletCommand(
    Guid WalletId,
    string Reason,
    Guid AdminId) : IRequest<AdminWalletActionResult>;

/// <summary>
/// EN: Command to unfreeze a wallet (Admin only).
/// VI: Command để mở băng ví (Chỉ Admin).
/// </summary>
public record AdminUnfreezeWalletCommand(
    Guid WalletId,
    string Reason,
    Guid AdminId) : IRequest<AdminWalletActionResult>;

/// <summary>
/// EN: Command to adjust wallet balance (Admin only).
/// VI: Command để điều chỉnh số dư ví (Chỉ Admin).
/// </summary>
public record AdminAdjustBalanceCommand(
    Guid WalletId,
    decimal Amount,
    int CurrencyTypeId,
    string Reason,
    Guid AdminId) : IRequest<AdminAdjustBalanceResult>;

#endregion

#region Admin Wallet Command Results

public record AdminWalletActionResult(
    Guid WalletId,
    string Status,
    string ActionBy,
    DateTime ActionAt);

public record AdminAdjustBalanceResult(
    Guid WalletId,
    decimal PreviousBalance,
    decimal AdjustmentAmount,
    decimal NewBalance,
    string Currency,
    string Reason,
    DateTime AdjustedAt);

#endregion

#region Admin Points Commands

/// <summary>
/// EN: Command to adjust points (Admin only).
/// VI: Command để điều chỉnh điểm (Chỉ Admin).
/// </summary>
public record AdminAdjustPointsCommand(
    Guid AccountId,
    long Points,
    string Reason,
    Guid AdminId) : IRequest<AdminAdjustPointsResult>;

/// <summary>
/// EN: Command to grant bonus points (Admin only).
/// VI: Command để tặng điểm thưởng (Chỉ Admin).
/// </summary>
public record AdminGrantBonusCommand(
    Guid AccountId,
    long Points,
    string Reason,
    int? ExpiryMonths,
    Guid AdminId) : IRequest<AdminGrantBonusResult>;

#endregion

#region Admin Points Command Results

public record AdminAdjustPointsResult(
    Guid AccountId,
    long PreviousPoints,
    long AdjustmentPoints,
    long NewPoints,
    string Reason,
    DateTime AdjustedAt);

public record AdminGrantBonusResult(
    Guid AccountId,
    long BonusPoints,
    long NewTotalPoints,
    DateTime? ExpiresAt,
    DateTime GrantedAt);

#endregion
