using QYZH.InteractiveMagazine.Models.Enum;

namespace QYZH.InteractiveMagazine.Models.Dto;

/// <summary>
/// 绑定期刊输入DTO
/// </summary>
public class BindJournalInput
{
    /// <summary>
    /// 期刊模板Id（扫码解析的期刊定义Id）
    /// </summary>
    public long JournalId { get; set; }

    /// <summary>
    /// 实例化期刊Id（扫码解析的具体期刊实例Id，可选）
    /// </summary>
    public long Id { get; set; }

    /// <summary>
    /// 关联类型: Read(已读), Favorite(收藏), Subscribe(订阅)，默认 Subscribe
    /// </summary>
    public string Type { get; set; } = UserJournalTypeEnum.Subscribe.ToString();
}

/// <summary>
/// 绑定期刊输出DTO
/// </summary>
public class BindJournalOutput
{
    /// <summary>
    /// 绑定记录Id
    /// </summary>
    public long Id { get; set; }

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

    /// <summary>
    /// 期刊模板Id
    /// </summary>
    public long JournalId { get; set; }

    /// <summary>
    /// 关联类型
    /// </summary>
    public string Type { get; set; } = string.Empty;

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

    /// <summary>
    /// 绑定时间
    /// </summary>
    public DateTime CreatedAt { get; set; }
}

/// <summary>
/// 用户期刊关联查询输入DTO
/// </summary>
public class UserJournalQueryInput : PageQueryModel
{
    /// <summary>
    /// 期刊模板Id
    /// </summary>
    public long? JournalId { get; set; }

    /// <summary>
    /// 实例化期刊Id
    /// </summary>
    public long Id { get; set; }    

    /// <summary>
    /// 关联类型: Read, Favorite, Subscribe
    /// </summary>
    public string? Type { get; set; }
}
