using QYZH.InteractiveMagazine.Models.Dto;

namespace QYZH.InteractiveMagazine.Models.Dto.CheckIn;

/// <summary>
/// 签到输出
/// </summary>
public class CheckInOutput
{
    /// <summary>
    /// 签到记录Id
    /// </summary>
    public long RecordId { get; set; }

    /// <summary>
    /// 签到日期
    /// </summary>
    public DateTime CheckInDate { get; set; }

    /// <summary>
    /// 连续签到天数
    /// </summary>
    public int ConsecutiveDays { get; set; }

    /// <summary>
    /// 本次获得积分
    /// </summary>
    public int PointsAwarded { get; set; }

    /// <summary>
    /// 本次获得成长值
    /// </summary>
    public int GrowthPointsAwarded { get; set; }

    /// <summary>
    /// 签到后用户积分余额
    /// </summary>
    public int PointsBalance { get; set; }

    /// <summary>
    /// 签到后用户成长值余额
    /// </summary>
    public int GrowthPointsBalance { get; set; }

    /// <summary>
    /// 是否有宠物（成长值是否喂养到宠物）
    /// </summary>
    public bool HasPet { get; set; }

    /// <summary>
    /// 宠物是否触发进化
    /// </summary>
    public bool HasEvolved { get; set; }

    /// <summary>
    /// 进化后的阶段名称（未进化则为空）
    /// </summary>
    public string? EvolvedStageName { get; set; }
}

/// <summary>
/// 签到信息输出（查询用）
/// </summary>
public class CheckInInfoOutput
{
    /// <summary>
    /// 今日是否已签到
    /// </summary>
    public bool HasCheckedInToday { get; set; }

    /// <summary>
    /// 当前连续签到天数
    /// </summary>
    public int ConsecutiveDays { get; set; }

    /// <summary>
    /// 累计签到天数
    /// </summary>
    public int TotalCheckInDays { get; set; }

    /// <summary>
    /// 用户当前积分余额
    /// </summary>
    public int PointsBalance { get; set; }

    /// <summary>
    /// 用户当前成长值余额
    /// </summary>
    public int GrowthPointsBalance { get; set; }

    /// <summary>
    /// 最近签到记录
    /// </summary>
    public List<CheckInRecordOutput> RecentRecords { get; set; } = [];
}

/// <summary>
/// 补签输入
/// </summary>
public class MakeUpCheckInInput
{
    /// <summary>
    /// 补签目标日期（yyyy-MM-dd）
    /// </summary>
    public DateTime TargetDate { get; set; }
}

/// <summary>
/// 签到记录输出
/// </summary>
public class CheckInRecordOutput
{
    /// <summary>
    /// 记录Id
    /// </summary>
    public long Id { get; set; }

    /// <summary>
    /// 签到日期
    /// </summary>
    public DateTime CheckInDate { get; set; }
    /// <summary>
    /// 签到时间
    /// </summary>
    public DateTime CreatedAt { get; set; }

    /// <summary>
    /// 连续签到天数
    /// </summary>
    public int ConsecutiveDays { get; set; }

    /// <summary>
    /// 本次获得积分
    /// </summary>
    public int PointsAwarded { get; set; }

    /// <summary>
    /// 本次获得成长值
    /// </summary>
    public int GrowthPointsAwarded { get; set; }

    /// <summary>
    /// 签到类型: Normal, MakeUp
    /// </summary>
    public string Type { get; set; } = string.Empty;

    /// <summary>
    /// 状态
    /// </summary>
    public string Status { get; set; } = string.Empty;
}
