using Hotline.Share.Dtos;
using Hotline.Share.Dtos.Article;
using Hotline.Share.Dtos.Snapshot;
using Hotline.Snapshot;
using BulletinOutDto = Hotline.Share.Dtos.Article.BulletinOutDto;

namespace Hotline.Application.Snapshot.Contracts;
public interface ISnapshotApplication
{
    /// <summary>
    /// 获取用户首页数据
    /// </summary>
    /// <returns></returns>
    Task<SnapshotUserInfoOutDto> GetSnapshotUserInfoAsync(CancellationToken token);

    /// <summary>
    /// 获取小程序首页数据
    /// </summary>
    /// <returns></returns>
    Task<HomePageOutDto> GetHomePageAsync();

    /// <summary>
    /// 获取行业集合
    /// </summary>
    /// <returns></returns>
    Task<IList<IndustryOutDto>> GetIndustresAsync();

    /// <summary>
    /// 获取小程序公告列表
    /// </summary>
    /// <param name="dto"></param>
    /// <returns></returns>
    Task<IReadOnlyList<BulletinListOutDto>> GetBulletinsAsync(BulletinInDto dto, CancellationToken cancellationToken);
    
    /// <summary>
    /// 获取工单列表
    /// </summary>
    Task<IList<OrderOutDto>> GetSnapshotOrdersAsync(OrderInDto dto, CancellationToken cancellationToken);

    /// <summary>
    /// 获取工单详情
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<OrderPublishDetailOutDto> GetSnapshotOrderDetailAsync(string id, CancellationToken cancellationToken);

    /// <summary>
    /// 统计红包金额, 每月的总金额
    /// </summary>
    /// <param name="count"></param>
    /// <returns></returns>
    Task<IReadOnlyList<RedPackDateOutDto>> GetRedPackDateAsync(RedPackDateInDto dto, CancellationToken cancellationToken);

    /// <summary>
    /// 获取当月详细红包列表
    /// </summary>
    /// <param name="dto"></param>
    /// <returns></returns>
    Task<IList<RedPackOutDto>> GetRedPacksAsync(RedPacksInDto dto, CancellationToken cancellationToken);

    /// <summary>
    /// 获取公告详情
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<BulletinOutDto> GetBulletinsDetailAsync(string id);

    /// <summary>
    /// 获取行业界面基础数据
    /// </summary>
    /// <param name="id"></param>
    /// <param name="requestAborted"></param>
    /// <returns></returns>
    Task<IndustryBaseOutDto> GetIndustryBaseAsync(string id, CancellationToken requestAborted);

    /// <summary>
    /// 添加随手拍公告
    /// </summary>
    /// <param name="dto"></param>
    /// <returns></returns>
    Task<string> AddBulletinAsync(AddSnapshotBulletinInDto dto);

    /// <summary>
    /// 审核公告
    /// </summary>
    /// <param name="examineBulletinDto"></param>
    /// <returns></returns>
    Task AuditBulletinAsync(ExamineBulletinDto examineBulletinDto);

    /// <summary>
    /// 获取公开的工单集合
    /// </summary>
    /// <param name="dto"></param>
    /// <param name="requestAborted"></param>
    /// <returns></returns>
    Task<IList<OrderPublishOutDto>> GetOrderPublishAsync(OrderPublishInDto dto, CancellationToken requestAborted);

    /// <summary>
    /// 获取公开的工单详情
    /// </summary>
    /// <param name="id"></param>
    /// <param name="requestAborted"></param>
    /// <returns></returns>
    Task<OrderPublishDetailOutDto> GetOrderPublishDetailAsync(string id, CancellationToken requestAborted);

    /// <summary>
    /// 获取用户领取的红包总金额
    /// </summary>
    /// <param name="requestAborted"></param>
    /// <returns></returns>
    Task<string> GetRedPackReceivedTotalAsync(CancellationToken requestAborted);

    /// <summary>
    /// 获取从业人员集合
    /// </summary>
    /// <param name="dto"></param>
    /// <param name="cancellationToken"></param>
    /// <returns></returns>
    Task<IList<PractitionerItemOutDto>> GetPractitionerItemsAsync(PractitionerItemInDto dto, CancellationToken cancellationToken);

    /// <summary>
    /// 获取从业人员详情
    /// </summary>
    /// <param name="id"></param>
    /// <param name="cancellationToken"></param>
    /// <returns></returns>
    Task<PractitionerDetailOutDto> GetPractitionerDetailAsync(string id, CancellationToken cancellationToken);

    /// <summary>
    /// 批量添加从业人员
    /// </summary>
    /// <param name="dtos"></param>
    /// <returns></returns>
    Task AddPractitionerAsync(IList<AddBatchPractitionerInDto> dtos);

    /// <summary>
    /// 添加志愿者
    /// </summary>
    /// <param name="dto"></param>
    /// <param name="cancellationToken"></param>
    /// <returns></returns>
    Task<string> AddVolunteerAsync(AddVolunteerInDto dto, CancellationToken cancellationToken);

    /// <summary>
    /// 志愿者上报
    /// </summary>
    /// <param name="dto"></param>
    /// <param name="requestAborted"></param>
    /// <returns></returns>
    Task<AddVolunteerReportOutDto> AddVolunteerReportAsync(AddVolunteerReportInDto dto, CancellationToken requestAborted);

    /// <summary>
    /// 保存用户自己的邀请码
    /// </summary>
    /// <param name="dto"></param>
    /// <returns></returns>
    Task SaveInvitationCodeAsync(SaveInvitationCodeInDto dto);

    /// <summary>
    /// 获取小程序首页弹窗
    /// </summary>
    Task<BulletinOutDto> GetBulletionPopupAsync(CancellationToken requestAborted);

    /// <summary>
    /// 推送工单到网格员系统
    /// </summary>
    /// <param name="orderId"></param>
    /// <returns></returns>
    Task PostOrderGuiderSystemAsync(string orderId, CancellationToken cancellationToken);

    /// <summary>
    /// 延迟检查网格员是否回复工单
    /// </summary>
    /// <param name="orderId"></param>
    /// <param name="cancellationToken"></param>
    /// <returns></returns>
    Task GuiderSystemReplyDelayAsync(string orderId, CancellationToken cancellationToken);

    /// <summary>
    /// 网格员系统回复
    /// </summary>
    /// <param name="dto"></param>
    /// <returns></returns>
    Task SaveGuiderSystemReplyAsync(GuiderSystemInDto dto, CancellationToken cancellationToken);

    /// <summary>
    /// 根据网格员系统回复的内容同步网格员信息
    /// </summary>
    /// <param name="orderId"></param>
    /// <param name="cancellationToken"></param>
    /// <returns></returns>
    Task SyncGuiderInfoAsync(string orderId, CancellationToken cancellationToken);

    /// <summary>
    /// 同步社区信息
    /// </summary>
    /// <param name="community"></param>
    /// <param name="cancellationToken"></param>
    /// <returns></returns>
    Task SyncCommunityInfoAsync(CommunityInfo community, CancellationToken cancellationToken);

    /// <summary>
    /// 生成用户红包审核数据
    /// </summary>
    /// <param name="id"></param>
    /// <param name="cancellationToken"></param>
    /// <returns></returns>
    Task<string> AddRedPardAsync(string id, CancellationToken cancellationToken);

    /// <summary>
    /// 获取回访详情
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<IList<OrderVisitItemsOutDto>> GetOrderVisitDetailAsync(string id);

    /// <summary>
    /// 积分榜
    /// </summary>
    /// <returns></returns>
    Task<PointsRankOutDto> GetPointsRankAsync();

    /// <summary>
    /// 积分详情集合
    /// </summary>
    /// <param name="dto"></param>
    /// <returns></returns>
    Task<IList<PointItemsOutDto>> GetPointItemsAsync(PointItemsInDto dto, CancellationToken token);

    /// <summary>
    /// 积分总计
    /// </summary>
    /// <param name="dto"></param>
    /// <param name="requestAborted"></param>
    /// <returns></returns>
    Task<int> GetPointsTotalAsync(PointItemsInDto dto, CancellationToken requestAborted);

    Task<IList<GetNotifyOutDto>> GetNotificationAsync(GetNotifyInDto dto, CancellationToken requestAborted);

    /// <summary>
    /// 获取通知详情
    /// </summary>
    /// <param name="id"></param>
    /// <param name="requestAborted"></param>
    /// <returns></returns>
    Task<BulletinOutDto> GetNotificationDetailsAsync(string id, CancellationToken requestAborted);
}
