using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
using ZR.Model.Models;

namespace ZR.Model.Dto.Inspect
{
    /// <summary>
    /// 质检管理/质检记录表查询对象
    /// </summary>
    public class QaInspectRecordQueryDto : PagerInfo
    {
        //交验单号
        public string DeliverNo { get; set; }
        //质检记录单号
        public string InspectNo { get; set; }
        //生产令号
        public string BomNo { get; set; }
        //BN/SN码
        public string BnSnCode { get; set; }
        //物料编码
        public string MaterialCode { get; set; }
        //物料名称
        public string MaterialName { get; set; }
        //物料类型
        public string Category { get; set; }
        //规格型号
        public string MaterialSpec { get; set; }
        //关键件标识
        public bool? KeyFlag { get; set; }
        //质检结果
        public string Result { get; set; }
        //创建时间

        public DateTime? BeginTime { get; set; }
        public DateTime? EndTime { get; set; }

    }
    public class QaInspectRecordQueryNoPageDto
    {
        public string DeliverNo { get; set; }
        public string BomNo { get; set; }
    }
    /// <summary>
    /// 质检管理/质检记录表输入输出对象
    /// </summary>
    public class QaInspectRecordDto
    {
        [Required(ErrorMessage = "质检记录ID不能为空")]
        public int InspectId { get; set; }

        [Required(ErrorMessage = "质检记录单号不能为空")]
        public string InspectNo { get; set; }

        [Required(ErrorMessage = "交验单号不能为空")]
        public string DeliverNo { get; set; }

        [Required(ErrorMessage = "生产令号不能为空")]
        public string BomNo { get; set; }

        [Required(ErrorMessage = "交验单行项目不能为空")]
        public int RowNo { get; set; }

        [Required(ErrorMessage = "物料类型（外协件，外购件）不能为空")]
        public string Category { get; set; }

        [Required(ErrorMessage = "物料编码不能为空")]
        public string MaterialCode { get; set; }

        [Required(ErrorMessage = "物料名称不能为空")]
        public string MaterialName { get; set; }

        [Required(ErrorMessage = "规格型号/图号不能为空")]
        public string MaterialSpec { get; set; }

        [Required(ErrorMessage = "关键件标识（0非关键件，1关键件）不能为空")]
        public bool KeyFlag { get; set; }

        [Required(ErrorMessage = "BN/SN码不能为空")]
        public string BnSnCode { get; set; }

        [Required(ErrorMessage = "交验单数量不能为空")]
        public int Qty { get; set; }

        [Required(ErrorMessage = "质检合格数量不能为空")]
        public int CheckQty { get; set; }

        public string InspectedBy { get; set; }

        public DateTime? InspectTime { get; set; }

        [Required(ErrorMessage = "质检结果（Wait未质检，OK质检合格，NG质检不合格）不能为空")]
        public string Result { get; set; }

        public string CreateBy { get; set; }

        public DateTime? CreateTime { get; set; }

        public string UpdateBy { get; set; }

        public DateTime? UpdateTime { get; set; }

        public string Remark { get; set; }
        
        public int? InstoreQty { get; set; }

        [Required(ErrorMessage = "入库结果。0：未入库；99：入库完成。不能为空")]
        public int InstoreResult { get; set; }


    }
}