using System.Collections.Generic;
using System.Threading.Tasks;
using Datory;
using GxPress.Common.Page;
using GxPress.Request.App.Missive;
using GxPress.Result.App.Missive;
using GxPress.Result.Job;

namespace GxPress.Repository.Interface.Missive
{
    public interface IMissiveRepository : IRepository
    {
        Task<int> InsertAsync(Entity.Missive.Missive missive);

        Task<Entity.Missive.Missive> GetAsync(int id);

        Task<bool> UpdateAsync(Entity.Missive.Missive missive);

        Task<bool> DeleteAsync(SqlKata.Query query);

        Task<bool> UpdateAsync(SqlKata.Query query);


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

        /// <summary>
        /// 获取站内信
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<PagedList<MissiveSearchResult>> GetMissiveSearchResultAsync(MissiveSearchRequest request);

        Task<List<JobMissiveResult>> ElasticSearchMissive();

        Task<Entity.Missive.Missive> GetAsync(SqlKata.Query query);
    }
}
