using Hotline.Share.Requests;

namespace Hotline.Share.Dtos.WebPortal
{
    /// <summary>
    /// 
    /// </summary>
    public class ArticleIdDto
    {
        /// <summary>
        /// 账号
        /// </summary>
        public string? ClientId { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string? ClientSecret { get; set; }

        /// <summary>
        /// 公告ID
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 分类名称
        /// </summary>
        public string TypeName { get; set; }
    }

    public class ArticleIdByNumDto
    {
        /// <summary>
        /// 账号
        /// </summary>
        public string? ClientId { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string? ClientSecret { get; set; }

        /// <summary>
        /// 公告分类
        /// </summary>
        public string? BulletinTypeId { get; set; }

        /// <summary>
        /// 条数
        /// </summary>
        public int Num { get; set; } = 1;

        /// <summary>
        /// 是否查询图片
        /// </summary>
        public string CheckChar { get; set; }

        /// <summary>
        /// 显示位置
        /// </summary>
        public string? BulletinDisplayLocation { get; set; }

        /// <summary>
        /// 公告范围，不传默认查询门户网站  0：全部；1：微信小程序；2：门户网站；4：市民APP；8：部门APP
        /// </summary>
        public string? PushRanges { get; set; }
    }

    /// <summary>
    /// 公告上一条下一条
    /// </summary>
    public class ArticlePreviousAndNextDto
    {
        /// <summary>
        /// 账号
        /// </summary>
        public string? ClientId { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string? ClientSecret { get; set; }

        /// <summary>
        /// 公告ID
        /// </summary>
        public string ID { get; set; }

        /// <summary>
        /// 公告分类
        /// </summary>
        public string? NoticeTypeId { get; set; }

        /// <summary>
        /// 关键字
        /// </summary>
        public string? Condition { get; set; }

        /// <summary>
        /// 是否全文查找
        /// </summary>
        public string? FullSearch { get; set; }

        /// <summary>
        /// 公告范围，不传默认查询门户网站  0：全部；1：微信小程序；2：门户网站；4：市民APP；8：部门APP
        /// </summary>
        public string? PushRanges { get; set; }
    }

    /// <summary>
    /// 公告上一条下一条 返回数据
    /// </summary>
    public class ArticlePreviousAndNextDataDto
    {
        /// <summary>
        /// 上一条P，下一条N
        /// </summary>
        public string pntype { get; set; }

        /// <summary>
        /// 公告ID
        /// </summary>
        public string NoticeID { get; set; }

        /// <summary>
        /// 公告标题
        /// </summary>
        public string NoticeTitle { get; set; }

        /// <summary>
        /// 分类
        /// </summary>
        public string NoticeTypeName { get; set; }
    }

    /// <summary>
    /// 公告详情
    /// </summary>
    public class ArticleDetailsDto
    {
        /// <summary>
        /// 公告ID
        /// </summary>
        public string NoticeID { get; set; }

        /// <summary>
        /// 分类名称
        /// </summary>
        public string NoticeTypeName { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string NoticeTitle { get; set; }

        /// <summary>
        /// 发布部门
        /// </summary>
        public string NoticeBMName { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? NoticeCreateDate { get; set; }

        /// <summary>
        /// 阅读次数
        /// </summary>
        public int NoticeRCount { get; set; }

        /// <summary>
        /// 视频地址
        /// </summary>
        public string WNED_VideoUrl { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        public string NoticeContent { get; set; }
    }

    /// <summary>
    /// 公告列表返回数据
    /// </summary>
    public class ArticleListDataDto
    {
        /// <summary>
        /// 总条数
        /// </summary>
        public int Total { get; set; }

        /// <summary>
        /// 总页数
        /// </summary>
        public int PageCount { get; set; } = 0;

        /// <summary>
        /// 数据
        /// </summary>
        public IReadOnlyList<ArticleListDto> data { get; set; }
    }

    public class ArticleDetailDataDto
    {
        /// <summary>
        /// 总条数
        /// </summary>
        public int Page { get; set; }

        /// <summary>
        /// 总页数
        /// </summary>
        public string NoticeID { get; set; }
        public string NoticeTitle { get; set; }

        public string NoticeTypeName { get; set; }
        public DateTime NoticeCreateDate { get; set; }
    }

    /// <summary>
    /// 公告列表
    /// </summary>
    public class ArticleListDto
    {
        /// <summary>
        /// 页码
        /// </summary>
        public int Page { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        public string NoticeContent { get; set; }

        /// <summary>
        /// ID
        /// </summary>
        public string NoticeID { get; set; }

        /// <summary>
        /// 分类名称
        /// </summary>
        public string NoticeTypeName { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string NoticeTitle { get; set; }

        /// <summary>
        /// 部门
        /// </summary>
        public string NoticeBMName { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? NoticeCreateDate { get; set; }

        /// <summary>
        /// 视频地址
        /// </summary>
        public string VideoUrl { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string WNLT_FullCode { get; set; }
    }

    /// <summary>
    /// 公告列表查询参数
    /// </summary>
    public record QueryArticleListDto : PagedRequest
    {
        /// <summary>
        /// 账号
        /// </summary>
        public string? ClientId { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string? ClientSecret { get; set; }

        /// <summary>
        /// 公告分类
        /// </summary>
        public string? NoticeType { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string? Condition { get; set; }

        /// <summary>
        /// 公告范围，不传默认查询门户网站  0：全部；1：微信小程序；2：门户网站；4：市民APP；8：部门APP
        /// </summary>
        public string? PushRanges { get; set; }
    }

    /// <summary>
    /// 全文搜索
    /// </summary>
    public class FullTextSearchListDto
    {
        /// <summary>
        /// 索引
        /// </summary>
        public int Page { get; set; }

        /// <summary>
        /// ID
        /// </summary>
        public string NoticeID { get; set; }

        /// <summary>
        /// 分类名称ID
        /// </summary>
        public string NoticeTypeID { get; set; }

        /// <summary>
        /// 分类名称
        /// </summary>
        public string NoticeTypeName { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string NoticeTitle { get; set; }

        /// <summary>
        /// 创建部门
        /// </summary>
        public string NoticeBMName { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public string NoticeCreateDate { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string TypeCode { get; set; }
    }

    /// <summary>
    /// 全文搜索返回参数
    /// </summary>
    public class FullTextSearchListDataDto
    {
        /// <summary>
        /// 总页数
        /// </summary>
        public int PageCount { get; set; } = 0;

        /// <summary>
        /// 数据
        /// </summary>
        public IReadOnlyList<FullTextSearchListDto> data { get; set; }
    }

    public class DateDto
    {
        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime StartTime { get; set; }

        /// <summary>
        /// /结束时间
        /// </summary>
        public DateTime EndTime { get; set; }
    }
}
