using QYZH.InteractiveMagazine.Models.Dto;
using QYZH.InteractiveMagazine.Models.Entity;

namespace QYZH.InteractiveMagazine.IService;

/// <summary>
/// 用户期刊关联服务接口
/// </summary>
public interface IUserJournalService : IBaseService<UserJournal>
{
    /// <summary>
    /// 用户绑定期刊（扫码绑定）
    /// </summary>
    /// <param name="userId">当前用户Id</param>
    /// <param name="input">绑定输入</param>
    /// <returns>绑定结果</returns>
    Task<BindJournalOutput> BindJournalAsync(long userId, BindJournalInput input);

    /// <summary>
    /// 获取用户的期刊绑定列表
    /// </summary>
    /// <param name="userId">用户Id</param>
    /// <param name="input">查询条件</param>
    /// <returns>分页结果</returns>
    Task<PageListModel<BindJournalOutput>> GetUserJournalsAsync(long userId, UserJournalQueryInput input);

    /// <summary>
    /// 取消期刊绑定
    /// </summary>
    /// <param name="userId">用户Id</param>
    /// <param name="id">绑定记录Id</param>
    Task UnbindJournalAsync(long userId, long id);
}
