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

namespace ZR.Model.Models.Inspect
{
    /// <summary>
    /// 接口管理/SAP交验单记录表，数据实体对象
    ///
    /// @author admin
    /// @date 2023-05-05
    /// </summary>
    [SugarTable("sap_deliver_record")]
    public class SapDeliverRecord : BusinessBase
    {
        /// <summary>
        /// 主键ID 
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
        public int Id { get; set; }

        /// <summary>
        /// 交验单号 
        /// </summary>
        public string DeliverNo { get; set; }
        /// <summary>
        /// 采购订单
        /// </summary>
        public string PurchaseOrder { get; set; }
        /// <summary>
        /// 检验人员 
        /// </summary>
        public string CheckName { 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>
        /// 交验单数量 
        /// </summary>
        public int Qty { get; set; }

        /// <summary>
        /// 抽检数量 
        /// </summary>
        [SugarColumn(ColumnName = "spot_check_qty")]
        public int SpotCheckQty { get; set; }

        /// <summary>
        /// 质量合格数量 
        /// </summary>
        [SugarColumn(ColumnName = "check_qty")]
        public int? CheckQty { get; set; }

        /// <summary>
        /// 质检结果（Wait未质检，OK质检合格，NG质检不合格，PartOK部分质检通过） 
        /// </summary>
        [SugarColumn(ColumnName = "check_result")]
        public string CheckResult { 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; }


    }

    public class SapDeliverRecordImportTemplete
    {
        ///// <summary>
        ///// 主键ID 
        ///// </summary>
        //public int Id { get; set; }

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

        /// <summary>
        /// 送检人员 
        /// </summary>
        public string CheckName { 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>
        /// 交验单数量 
        /// </summary>
        public int Qty { get; set; }

        /// <summary>
        /// 抽检数量 
        /// </summary>
        public int SpotCheckQty { get; set; }

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

        /// <summary>
        /// 质检结果（Wait未质检，OK质检合格，NG质检不合格，PartOK部分质检通过） 
        /// </summary>
        public string CheckResult { get; set; }

        /// <summary>
        /// 入库数量 
        /// </summary>
        public int? InstoreQty { get; set; }

        /// <summary>
        /// 入库结果（0未入库，99入库完成） 
        /// </summary>
        public int InstoreResult { get; set; }


    }

}