123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Threading.Tasks;
- using Datory;
- using GxPress.Common.Page;
- using GxPress.Request.App.Note;
- using GxPress.Request.Web;
- using GxPress.Result.App.Note;
- using GxPress.Result.Web;
- namespace GxPress.Repository.Interface.Note
- {
- public interface INoteRepository : IRepository
- {
- /// <summary>
- /// 获取笔记
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- Task<Entity.Note.Note> GetAsync(int id);
- /// <summary>
- /// 添加笔记
- /// </summary>
- /// <param name="note"></param>
- /// <returns></returns>
- Task<int> InsertAsync(Entity.Note.Note note);
- /// <summary>
- /// 修改笔记
- /// </summary>
- /// <param name="note"></param>
- /// <returns></returns>
- Task<bool> UpdateAsync(Entity.Note.Note note);
- /// <summary>
- /// 获取笔记分页
- /// </summary>
- /// <param name="request"></param>
- /// <returns></returns>
- Task<PagedList<NotePageListRequest>> NotePageListAsync(NoteSearchPageListRequest request);
- Task<bool> DeleteAsync(SqlKata.Query query);
- Task<bool> DeleteAsync(int id);
- Task<bool> UpdateAsync(SqlKata.Query query);
- /// <summary>
- ///查询个人摘录
- /// </summary>
- /// <param name="request"></param>
- /// <returns></returns>
- Task<PagedList<NoteUserExtractResult>> GetAllByUserId(NoteUserRequest request);
- /// <summary>
- /// web页面查询话题
- /// </summary>
- /// <param name="request"></param>
- /// <returns></returns>
- Task<PagedList<NoteTopicResult>> GetTopicNoteAsync(NoteSearchPageListRequest request);
- /// <summary>
- /// 笔记没有文件夹分页
- /// </summary>
- /// <param name="request"></param>
- /// <returns></returns>
- Task<PagedList<NoteNotFolderPageResult>> GetNoteNotFolderPageResult(NoteSearchPageListRequest request);
- /// <summary>
- /// 设置置顶
- /// </summary>
- /// <param name="noteId"></param>
- /// <returns></returns>
- Task<bool> SetIsTopAsync(int noteId);
- /// <summary>
- /// 获取用户最近使用的文件夹
- /// </summary>
- /// <param name="userId"></param>
- /// <returns></returns>
- Task<IEnumerable<int>> GetLatelyFolderIdAsync(int userId, bool isTopic);
- /// <summary>
- /// 获取笔记/话题草稿分页
- /// </summary>
- /// <param name="request"></param>
- /// <returns></returns>
- Task<PagedList<NoteNotFolderPageResult>> NoteTopicDraftPageListAsync(NoteSearchPageListRequest request);
- /// <summary>
- /// 获取用户是否存在草稿
- /// </summary>
- /// <param name="userId"></param>
- /// <returns></returns>
- Task<bool> IsExistsDraftAsync(int userId, bool isTopic);
- /// <summary>
- /// 获取用户最新的草稿Id
- /// </summary>
- /// <param name="userId"></param>
- /// <returns></returns>
- Task<int> GetNoteIdByDraftAsync(int userId, bool isTopic);
- /// <summary>
- /// 获取用户最新的草稿Id
- /// </summary>
- /// <param name="userId"></param>
- /// <returns></returns>
- Task<int> GetDraftCountAsync(int userId, bool isTopic);
- /// <summary>
- /// 清空草稿箱
- /// </summary>
- /// <param name="userId"></param>
- /// <param name="typeValue"></param>
- /// <returns></returns>
- Task<bool> ClearDraftAsync(int userId, int typeValue);
- Task<IEnumerable<Entity.Note.Note>> GetAllAsync(SqlKata.Query query);
- }
- }
|