namespace QYZH.InteractiveMagazine.Models.Dto.Pet;

/// <summary>
/// 宠物信息输出
/// </summary>
public class PetOutput
{
    /// <summary>
    /// 主键ID
    /// </summary>
    public long Id { get; set; }

    /// <summary>
    /// 用户Id
    /// </summary>
    public long UserId { get; set; }

    /// <summary>
    /// 宠物模板Id
    /// </summary>
    public long TemplateId { get; set; }

    /// <summary>
    /// 宠物模板名称
    /// </summary>
    public string? TemplateName { get; set; }

    /// <summary>
    /// 宠物昵称
    /// </summary>
    public string? Name { get; set; }

    /// <summary>
    /// 当前进化形态Id
    /// </summary>
    public long CurrentEvolutionId { get; set; }

    /// <summary>
    /// 当前进化阶段名称
    /// </summary>
    public string? EvolutionStageName { get; set; }

    /// <summary>
    /// 当前成长值
    /// </summary>
    public int GrowthPoints { get; set; }

    /// <summary>
    /// 累计喂养次数
    /// </summary>
    public int FeedingCount { get; set; }

    /// <summary>
    /// 当前皮肤Id
    /// </summary>
    public long CurrentSkinId { get; set; }

    /// <summary>
    /// 当前皮肤名称
    /// </summary>
    public string? CurrentSkinName { get; set; }

    /// <summary>
    /// 当前形态+当前皮肤 的图片列表（按SortOrder排序）
    /// </summary>
    public List<SkinImageOutput> CurrentImages { get; set; } = new();

    /// <summary>
    /// 宠物类型: Normal
    /// </summary>
    public string Type { get; set; } = string.Empty;

    /// <summary>
    /// 状态: Inactive, Active, Sleeping
    /// </summary>
    public string Status { get; set; } = string.Empty;

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreatedAt { get; set; }
}

/// <summary>
/// 皮肤图片输出
/// </summary>
public class SkinImageOutput
{
    /// <summary>
    /// 图片Id
    /// </summary>
    public long Id { get; set; }

    /// <summary>
    /// 图片地址
    /// </summary>
    public string ImageUrl { get; set; } = string.Empty;

    /// <summary>
    /// 图片顺序
    /// </summary>
    public int SortOrder { get; set; }
}

/// <summary>
/// 喂养宠物输入
/// </summary>
public class FeedPetInput
{
    /// <summary>
    /// 宠物Id
    /// </summary>
    public long PetId { get; set; }

    /// <summary>
    /// 增加的成长值
    /// </summary>
    public int GrowthPoints { get; set; }
}

/// <summary>
/// 喂养宠物输出
/// </summary>
public class FeedPetOutput
{
    /// <summary>
    /// 宠物Id
    /// </summary>
    public long PetId { get; set; }

    /// <summary>
    /// 喂养前成长值
    /// </summary>
    public int GrowthBefore { get; set; }

    /// <summary>
    /// 喂养后成长值
    /// </summary>
    public int GrowthAfter { get; set; }

    /// <summary>
    /// 本次成长变化量
    /// </summary>
    public int GrowthChange { get; set; }

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

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

/// <summary>
/// 喂养记录输出
/// </summary>
public class FeedingRecordOutput
{
    /// <summary>
    /// 记录Id
    /// </summary>
    public long Id { get; set; }

    /// <summary>
    /// 宠物Id
    /// </summary>
    public long PetId { get; set; }

    /// <summary>
    /// 用户Id
    /// </summary>
    public long UserId { get; set; }

    /// <summary>
    /// 成长值变化量
    /// </summary>
    public int GrowthChange { get; set; }

    /// <summary>
    /// 喂养前成长值
    /// </summary>
    public int GrowthBefore { get; set; }

    /// <summary>
    /// 喂养后成长值
    /// </summary>
    public int GrowthAfter { get; set; }

    /// <summary>
    /// 喂养类型: Normal, Special
    /// </summary>
    public string Type { get; set; } = string.Empty;

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

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreatedAt { get; set; }
}
