using HoneyBox.Admin.Business.Models.Reward;

namespace HoneyBox.Admin.Business.Models.SignConfig;

#region Response Models

/// <summary>
/// 签到配置响应模型
/// </summary>
public class SignConfigResponse
{
    /// <summary>
    /// 主键ID
    /// </summary>
    public int Id { get; set; }

    /// <summary>
    /// 签到类型：1-每日签到 2-累计签到
    /// </summary>
    public int Type { get; set; }

    /// <summary>
    /// 签到类型名称
    /// </summary>
    public string TypeName { get; set; } = string.Empty;

    /// <summary>
    /// 签到天数
    /// </summary>
    public int? Day { get; set; }

    /// <summary>
    /// 标题
    /// </summary>
    public string? Title { get; set; }

    /// <summary>
    /// 图标URL
    /// </summary>
    public string? Icon { get; set; }

    /// <summary>
    /// 状态：1-启用 0-禁用
    /// </summary>
    public int Status { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int? Sort { get; set; }

    /// <summary>
    /// 奖励ID（业务标识）
    /// </summary>
    public string RewardId { get; set; } = string.Empty;

    /// <summary>
    /// 描述
    /// </summary>
    public string? Description { get; set; }

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

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime? UpdatedAt { get; set; }

    /// <summary>
    /// 关联的奖励列表
    /// </summary>
    public List<RewardResponse> Rewards { get; set; } = new();
}

#endregion

#region Request Models

/// <summary>
/// 签到配置列表查询请求
/// </summary>
public class SignConfigListRequest : PagedRequest
{
    /// <summary>
    /// 签到类型筛选：1-每日签到 2-累计签到
    /// </summary>
    public int Type { get; set; } = 1;

    /// <summary>
    /// 关键词搜索（搜索标题）
    /// </summary>
    public string? Keyword { get; set; }
}

/// <summary>
/// 签到配置创建请求
/// </summary>
public class SignConfigCreateRequest
{
    /// <summary>
    /// 签到类型：1-每日签到 2-累计签到
    /// </summary>
    public int Type { get; set; }

    /// <summary>
    /// 签到天数
    /// </summary>
    public int? Day { get; set; }

    /// <summary>
    /// 标题
    /// </summary>
    public string Title { get; set; } = string.Empty;

    /// <summary>
    /// 图标URL
    /// </summary>
    public string? Icon { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int? Sort { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    public string? Description { get; set; }

    /// <summary>
    /// 奖励列表
    /// </summary>
    public List<RewardItem> Rewards { get; set; } = new();
}

/// <summary>
/// 签到配置更新请求
/// </summary>
public class SignConfigUpdateRequest
{
    /// <summary>
    /// 签到类型：1-每日签到 2-累计签到
    /// </summary>
    public int Type { get; set; }

    /// <summary>
    /// 签到天数
    /// </summary>
    public int? Day { get; set; }

    /// <summary>
    /// 标题
    /// </summary>
    public string Title { get; set; } = string.Empty;

    /// <summary>
    /// 图标URL
    /// </summary>
    public string? Icon { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int? Sort { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    public string? Description { get; set; }
}

/// <summary>
/// 签到配置状态更新请求
/// </summary>
public class SignConfigStatusRequest
{
    /// <summary>
    /// 状态：1-启用 0-禁用
    /// </summary>
    public int Status { get; set; }
}

/// <summary>
/// 签到配置排序更新请求
/// </summary>
public class SignConfigSortRequest
{
    /// <summary>
    /// 排序值
    /// </summary>
    public int Sort { get; set; }
}

/// <summary>
/// 签到配置奖励更新请求
/// </summary>
public class SignConfigRewardRequest
{
    /// <summary>
    /// 奖励列表
    /// </summary>
    public List<RewardItem> Rewards { get; set; } = new();
}

#endregion
