using Hotline.Share.Dtos.File;
using Hotline.Share.Enums.Snapshot;
using Hotline.Share.Requests;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XF.Utility.EnumExtensions;

namespace Hotline.Share.Dtos.Snapshot;
internal class OrderPublishDto
{
}

public class AddSnapshotOrderPublishInDto
{
    [Required]
    public string OrderId { get; set; }

    /// <summary>
    /// 整理标题
    /// </summary>
    [Required]
    public string ArrangeTitle { get; set; }

    /// <summary>
    /// 整理内容
    /// </summary>
    [Required]
    public string ArrangeContent { get; set; }

    /// <summary>
    /// 整理结果
    /// </summary>
    [Required]
    public string ArrangeOpinion { get; set; }

    /// <summary>
    /// 受理时间
    /// </summary>
    [Required]
    public DateTime HandleTime { get; set; }

    /// <summary>
    /// 整理地点
    /// </summary>
    [Required]
    public string ArrangeAddress { get; set; }
}

public class OrderPublishInDto : QueryFixedDto
{
    /// <summary>
    /// 搜索文本
    /// </summary>
    public string? Keyword { get; set; }

    /// <summary>
    /// 行业Id
    /// </summary>
    [Required]
    public string IndustryId { get; set; }
}

public class OrderPublishDetailOutDto : OrderPublishOutDto
{
    /// <summary>
    /// 是否保密
    /// </summary>
    public bool IsSecret { get; set; }

    /// <summary>
    /// 事件描述
    /// </summary>
    public string Content { get; set; }

    /// <summary>
    /// 回复
    /// </summary>
    public string Opinion { get; set; }

    /// <summary>
    /// 附件
    /// </summary>
    public List<FileJson> FileJson { get; set; } = [];

    /// <summary>
    /// 市民是否评价
    /// </summary>
    public bool IsVisit { get; set; } = false;

    /// <summary>
    /// 办理流程
    /// </summary>
    public List<SnapshotWorkflow> Workflow { get; set; }

    /// <summary>
    /// 审核意见
    /// </summary>
    public string? AuditRemark { get; set; }

    /// <summary>
    /// 奖励审核状态
    /// </summary>
    public ERedPackAuditStatus RedPackStatus { get; set; }

    /// <summary>
    /// 奖励审核状态(中文)
    /// </summary>
    public string RedPackStatusTxt => RedPackStatus.GetDescription();

    /// <summary>
    /// 事发地点
    /// </summary>
    public string FullAddress { get; set; }

    /// <summary>
    /// 线索名称
    /// </summary>
    public string HotspotSpliceName { get; set; }

    /// <summary>
    /// 上报时间
    /// </summary>
    public DateTime CreationTime { get; set; }
}

public class SnapshotWorkflow
{
    public SnapshotWorkflow(string id, string name, DateTime dateTime)
    {
        Id = id;
        Name = name;
        HandleTime = dateTime;
    }

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

    /// <summary>
    /// 接办部门名称
    /// </summary>
    public string Name { get; set; }

    /// <summary>
    /// 接办时间
    /// </summary>
    public DateTime HandleTime { get; set; }
}

public class OrderPublishOutDto
{
    /// <summary>
    /// Id
    /// </summary>
    public string Id { get; set; }

    /// <summary>
    /// 编号
    /// </summary>
    public string No { get; set; }

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

    /// <summary>
    /// 受理时间
    /// </summary>
    public DateTime HandleTime { get; set; }

    /// <summary>
    /// 区/县
    /// </summary>
    public string County { get; set; }
}


/// <summary>
/// 满意度
/// </summary>
public class OrderVisitItemsOutDto
{
    /// <summary>
    /// 中心满意度
    /// </summary>
    public string SeatEvaluate { get; set; }

    /// <summary>
    /// 部门满意度
    /// </summary>
    public string OrgProcessingResults { get; set; }

    /// <summary>
    /// 办事态度
    /// </summary>
    public string OrgHandledAttitude { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }
}
