namespace Yi.Framework.AiHub.Application.Contracts.Dtos.CardFlip;

/// <summary>
/// 翻牌任务状态输出
/// </summary>
public class CardFlipStatusOutput
{
    /// <summary>
    /// 本周总翻牌次数
    /// </summary>
    public int TotalFlips { get; set; }

    /// <summary>
    /// 剩余免费次数
    /// </summary>
    public int RemainingFreeFlips { get; set; }

    /// <summary>
    /// 剩余赠送次数
    /// </summary>
    public int RemainingBonusFlips { get; set; }

    /// <summary>
    /// 剩余邀请解锁次数
    /// </summary>
    public int RemainingInviteFlips { get; set; }

    /// <summary>
    /// 是否可以翻牌
    /// </summary>
    public bool CanFlip { get; set; }

    /// <summary>
    /// 用户的邀请码
    /// </summary>
    public string? MyInviteCode { get; set; }

    /// <summary>
    /// 本周邀请人数
    /// </summary>
    public int InvitedCount { get; set; }
    
    /// <summary>
    /// 翻牌记录
    /// </summary>
    public List<CardFlipRecord> FlipRecords { get; set; } = new();

    /// <summary>
    /// 下次可翻牌提示
    /// </summary>
    public string? NextFlipTip { get; set; }

    /// <summary>
    /// 当前用户是否已经填写过邀请码
    /// </summary>
    public bool IsFilledInviteCode { get; set; }
}

/// <summary>
/// 翻牌记录
/// </summary>
public class CardFlipRecord
{
    /// <summary>
    /// 翻牌序号（1-10）
    /// </summary>
    public int FlipNumber { get; set; }

    /// <summary>
    /// 是否已翻
    /// </summary>
    public bool IsFlipped { get; set; }

    /// <summary>
    /// 是否中奖
    /// </summary>
    public bool IsWin { get; set; }

    /// <summary>
    /// 奖励金额（token数）
    /// </summary>
    public long? RewardAmount { get; set; }

    /// <summary>
    /// 翻牌类型描述
    /// </summary>
    public string? FlipTypeDesc { get; set; }

    /// <summary>
    /// 在翻牌顺序中的位置（1-10，表示第几个翻）
    /// </summary>
    public int FlipOrderIndex { get; set; }
}
