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;
using XF.Utility.EnumExtensions;

namespace Hotline.Share.Dtos.Quality
{
    public class QualityItemAddDto
    {
        /// <summary>
        /// 质检项目名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 质检项目描述
        /// </summary>
        public string? Describe { get; set; }

        /// <summary>
        /// 质检项目分组名称
        /// </summary>
        public string GroupingName { get; set; }

        /// <summary>
        /// 是否智能质检项目
        /// </summary>
        public int IsIntelligent { get; set; }

        /// <summary>
        /// 分值
        /// </summary>
        public int Grade { get; set; }

        /// <summary>
        /// 启禁用
        /// </summary>
        public int IsEnable { get; set; }
    }
    public class QualityItemDeleteDto
    {
        public string Id { get; set; }
    }
    public class QualityItemBatchDeleteDto
    {
        public List<string> Ids { get; set; }
    }
    public class QualityItemUpdateDto : QualityItemAddDto
    {
        public string Id { get; set; }
    }
    public record QualityItemListDto : PagedKeywordRequest
    {
        /// <summary>
        /// 质检项目名称
        /// </summary>
        public string? Name { get; set; }

        /// <summary>
        /// 质检项目分组名称
        /// </summary>
        public string? GroupingName { get; set; }

        /// <summary>
        /// 启禁用
        /// </summary>
        public int? IsEnable { get; set; }

        /// <summary>
        /// 质检项目描述
        /// </summary>
        public string? Describe { get; set; }

        /// <summary>
        /// 分值
        /// </summary>
        public int? MaxGrade { get; set; }
        public int? MinGrade { get; set; }

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

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

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

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? LastModificationTimeStart { get; set; }
        public DateTime? LastModificationTimeEnd { get; set; }
    }
    public class QualityItemBaseDto
    {
        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 QualityItemDto : QualityItemBaseDto
    {
        /// <summary>
        /// 质检项目名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 质检项目描述
        /// </summary>
        public string? Describe { get; set; }

        /// <summary>
        /// 质检项目分组名称
        /// </summary>
        public string GroupingName { get; set; }

        /// <summary>
        /// 是否智能质检项目
        /// </summary>
        public int IsIntelligent { get; set; }

        /// <summary>
        /// 分值
        /// </summary>
        public int Grade { get; set; }

        /// <summary>
        /// 启禁用
        /// </summary>
        public int IsEnable { get; set; }

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

    }
}
