using Hotline.Share.Enums.Order;
using Hotline.Share.Requests;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hotline.Share.Dtos.Order
{
    public class OrderFinalityDto : OrderFinalityBaseDto
    {
        /// <summary>
        /// 工单ID
        /// </summary>
        public string OrderId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public OrderDto Order { get; set; }
    }

    public class OrderFinalityAddDto
    {

        /// <summary>
        /// 工单ID
        /// </summary>
        public List<OrdersFinalityAddDto> OrderIds { get; set; }
    }
    public class OrdersFinalityAddDto
    {

        public string OrderId { get; set; }
    }

    public class OrderFinalityDeleteDto
    {
        public List<string> Ids { get; set; }
    }

    public class OrderFinalityUpdateDto : OrderFinalityAddDto
    {
        public string Id { get; set; }
    }

    public record OrderFinalityListDto : PagedKeywordRequest
    {
        /// <summary>
        /// 编号
        /// </summary>
        public string? No { get; set; }

        /// <summary>
        /// 工单状态
        /// </summary>
        public EOrderStatus? Status { get; set; }

        /// <summary>
        /// 来源渠道
        /// </summary>
        public string? Channel { get; set; }

        /// <summary>
        /// 当前节点
        /// </summary>
        public string? CurrentStepName { get; set; }

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

        /// <summary>
        /// 受理时间(工单创建时间)
        /// </summary>
        public DateTime? CreationTimeStart { get; set; }
        public DateTime? CreationTimeEnd { get; set; }

        /// <summary>
        /// 设置人
        /// </summary>
        public string? CreatorName { get; set; }

        /// <summary>
        /// 设置时间
        /// </summary>
        public DateTime? SetCreationTimeStart { get; set; }
        public DateTime? SetCreationTimeEnd { get; set; }

        /// <summary>
        /// 期满时间
        /// </summary>
        public DateTime? ExpiredTimeStart { get; set; }
        public DateTime? ExpiredTimeEnd { get; set; }

        /// <summary>
        /// 受理类型
        /// </summary>
        public string? AcceptTypeCode { get; set; }

        /// <summary>
        /// 热点分类关键词
        /// </summary>
        public string? Hotspot { get; set; }

        /// <summary>
        /// 接办部门
        /// </summary>
        public string? CurrentHandleOrgName { get; set; }

        /// <summary>
        /// 接办时间
        /// </summary>
        public DateTime? CurrentHandleTimeStart { get; set; }
        public DateTime? CurrentHandleTimeEnd { get; set; }

        /// <summary>
        /// 办结时间
        /// </summary>
        public DateTime? FiledTimeStart { get; set; }
        public DateTime? FiledTimeEnd { get; set; }

        /// <summary>
        /// 省工单
        /// </summary>
        public bool? IsProvinceOrder { get; set; }
    }
    public class OrderFinalityBaseDto
    {
        public DateTime? LastModificationTime { get; set; }

        public bool IsDeleted { get; set; }

        /// <summary>
        /// 删除时间
        /// </summary>
        public DateTime? DeletionTime { get; set; }


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

        public string Id { get; set; }

        /// <summary>
        /// 组织Id
        /// </summary>
        public string? CreatorOrgId { get; set; }


        public string? CreatorOrgName { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string? CreatorId { get; set; }

        public string? CreatorName { get; set; }
    }
}
