IFriendsRepository.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System.Collections.Generic;
  2. using System.Threading.Tasks;
  3. using Datory;
  4. namespace GxPress.Repository.Interface.Friends
  5. {
  6. public interface IFriendsRepository : IRepository
  7. {
  8. /// <summary>
  9. /// 添加
  10. /// </summary>
  11. /// <param name="model"></param>
  12. /// <returns></returns>
  13. Task<int> AddAsync(Entity.Friends model);
  14. /// <summary>
  15. /// 删除我的好友
  16. /// </summary>
  17. /// <param name="friendsIds"></param>
  18. /// <param name="userId"></param>
  19. /// <returns></returns>
  20. Task<bool> DeleteAsync(IEnumerable<int> friendsIds, int userId);
  21. /// <summary>
  22. /// 获取好友数据
  23. /// </summary>
  24. /// <param name="userId"></param>
  25. /// <param name="addressBookGroupId"></param>
  26. /// <returns></returns>
  27. Task<IEnumerable<int>> GetFriendsIdsAsync(int userId, int addressBookGroupId);
  28. /// <summary>
  29. /// 好友移动到自己分组
  30. /// </summary>
  31. /// <param name="friendsUserId"></param>
  32. /// <param name="userId"></param>
  33. /// <param name="addressBookGroupId"></param>
  34. /// <returns></returns>
  35. Task<bool> UpdateAddressBookGroupId(IEnumerable<int> friendsUserId, int userId, int addressBookGroupId);
  36. /// <summary>
  37. /// 是否是好友
  38. /// </summary>
  39. /// <param name="friendsUserId"></param>
  40. /// <param name="userId"></param>
  41. /// <returns></returns>
  42. Task<bool> ExistsAsync(int friendsUserId, int userId);
  43. }
  44. }