using Hotline.Share.Dtos.Quality;
using Hotline.Share.Enums.Quality;
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 RepeatableEventAddDto
	{
		/// <summary>
		/// 标题
		/// </summary>
		public string Title { get; set; }

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

		/// <summary>
		/// 关键词
		/// </summary>
		public string? KeyWords { get; set; }

		public List<RepeatableEventDetailDto> Details { get; set; }
	}

	public class RepeatableEventDeleteDto
	{
		public string Id { get; set; }
	}
	public class RepeatableEventUpdateDto : RepeatableEventAddDto
	{
		public string Id { get; set; }
		/// <summary>
		/// 更新人
		/// </summary>
		public string? LastModificationName { get; set; }
	}
	public record RepeatableEventListDto : PagedKeywordRequest
	{
		/// <summary>
		/// 标题
		/// </summary>
		public string? Title { get; set; }

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

		/// <summary>
		/// 关键词
		/// </summary>
		public string? KeyWords { get; set; }

		public DateTime? CreationTimeStart { get; set; }
		public DateTime? CreationTimeEnd { get; set; }
	}

	public class RepeatableEventEntityDto
	{
		public string Id { get; set; }

		/// <summary>
		/// 
		/// </summary>
		public string? Keyword { get; set; }
	}
	public class RepeatableEventBaseDto
	{
		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; }
	}


	public class RepeatableEventDto : RepeatableEventBaseDto
	{
		/// <summary>
		/// 标题
		/// </summary>
		public string Title { get; set; }

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

		/// <summary>
		/// 关键词
		/// </summary>
		public string? KeyWords { get; set; }

		/// <summary>
		/// 更新人
		/// </summary>
		public string? LastModificationName { get; set; }

		public List<RepeatableEventDetailDto> Details { get; set; }
	}
	public class RepeatableEventDetailDto 
	{
		/// <summary>
		/// 重复ID
		/// </summary>
		public string RepeatableId { get; set; }

		/// <summary>
		/// 工单id
		/// </summary>
		public string OrderId { get; set; }

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

		public RepeatableEventDto Repeatable { get; set; }
	}

	public class RepeatableEventDetailOpDto {

		/// <summary>
		/// 重复ID
		/// </summary>
		public string? RepeatableId { get; set; }

		/// <summary>
		/// 工单id
		/// </summary>
		public string? OrderId { get; set; }

		public bool IsDeleted { get; set; } = false;

		public string Id {  get; set; }= string.Empty;
	}
}
