using System;
using SqlSugar;
using System.Collections.Generic;

namespace ZR.Model.Models.Inspect
{
    /// <summary>
    /// 质检管理/质检记录表，数据实体对象
    ///
    /// @author admin
    /// @date 2023-05-05
    /// </summary>
    [SugarTable("qa_inspect_record")]
    public class QaInspectRecord : BusinessBase
    {
        /// <summary>
        /// 质检记录ID 
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
        public int InspectId { get; set; }

        /// <summary>
        /// 质检记录单号 
        /// </summary>
        public string InspectNo { get; set; }

        /// <summary>
        /// 交验单号 
        /// </summary>
        public string DeliverNo { get; set; }

        /// <summary>
        /// 生产令号 
        /// </summary>
        public string BomNo { get; set; }

        /// <summary>
        /// 交验单行项目 
        /// </summary>
        public int RowNo { get; set; }

        /// <summary>
        /// 物料类型（外协件，外购件） 
        /// </summary>
        public string Category { get; set; }

        /// <summary>
        /// 物料编码 
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料名称 
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 规格型号/图号 
        /// </summary>
        public string MaterialSpec { get; set; }

        /// <summary>
        /// 关键件标识（0非关键件，1关键件） 
        /// </summary>
        public bool KeyFlag { get; set; }

        /// <summary>
        /// BN/SN码 
        /// </summary>
        public string BnSnCode { get; set; }

        /// <summary>
        /// 交验单数量 
        /// </summary>
        public int Qty { get; set; }

        /// <summary>
        /// 质检合格数量 
        /// </summary>
        public int CheckQty { get; set; }

        /// <summary>
        /// 质检人 
        /// </summary>
        [SugarColumn(ColumnName = "inspected_by")]
        public string InspectedBy { get; set; }

        /// <summary>
        /// 质检时间 
        /// </summary>
        [SugarColumn(ColumnName = "inspect_time")]
        public DateTime? InspectTime { get; set; }

        /// <summary>
        /// 质检结果（Wait未质检，OK质检合格，NG质检不合格） 
        /// </summary>
        public string Result { get; set; }

        /// <summary>
        /// 入库数量 
        /// </summary>
        [SugarColumn(ColumnName = "instore_qty")]
        public int? InstoreQty { get; set; }

        /// <summary>
        /// 入库结果。0：未入库；99：入库完成。 
        /// </summary>
        [SugarColumn(ColumnName = "instore_result")]
        public int InstoreResult { get; set; }

    }
}