using System.Collections.Generic;
using System.Threading.Tasks;
using GxPress.Entity;
using Datory;
using GxPress.Request.Notice;
using GxPress.Result.Notice;
using SqlKata;

namespace GxPress.Repository.Interface
{
    /// <summary>
    /// 收件人
    /// </summary>
    public interface INoticeAddresseeRepository : IRepository
    {
        /// <summary>
        /// 根据通知ID获取抄送人
        /// </summary>
        /// <param name="noticeId"></param>
        /// <returns></returns>
        Task<IEnumerable<NoticeAddressee>> GetNoticeAddresseeByNoticeIdAsync(int noticeId);

        Task<bool> DeleteAsync(int noticeId);
        Task<int> InsertAsync(NoticeAddressee noticeAddressee);
        /// <summary>
        /// 插入收件人
        /// </summary>
        /// <param name="noticeAddressees"></param>
        /// <returns></returns>
        Task<bool> InsertAsync(List<NoticeAddressee> noticeAddressees);
        Task<IEnumerable<NoticeReadListResult>> GetNoticeAddresseeByUserIdIdAsync(NoticeReadListRequest request);

        Task<int> CountAsync(SqlKata.Query query);

        Task<IEnumerable<NoticeAddressee>> GetAllAsync(SqlKata.Query query);

        Task<bool> UpdateAsync(SqlKata.Query query);
        /// <summary>
        /// 获取收件人
        /// </summary>
        /// <param name="noticeId"></param>
        /// <returns></returns>
        Task<IEnumerable<User>> GetUserByNoticeIdAsync(int noticeId);
        Task<bool> ExistsAsync(Query query);
    }
}
