
//-----------------------------------------------------------------------
//<copyright>
// * Copyright (C) 2021 KEHAIDASOFT All Rights Reserved
// * version : 4.0.30319.42000
// * author  : khd by t4-2
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Khd.Core.Domain.Models
{

    [Table("wms_raw_instock_detail")]
    public class WmsRawInstockDetail
    {

        [Key]
        [Column("raw_instock_detail_id")]
        public long rawInstockDetailId { get; set; }

        /// <summary>
        /// 原材料入库ID
        /// </summary>
        [Column("raw_instock_id")]
        public long rawInstockId { get; set; }

        /// <summary>
        /// 原材料入库任务编号，同原材料入库记录
        /// </summary>
        [Column("task_code")]
        public string taskCode { get; set; }

        /// <summary>
        /// 库位编码
        /// </summary>
        [Column("location_code")]
        public string locationCode { get; set; }

        /// <summary>
        /// 存放物料条码,入库扫描条码时，从打印条码记录表中获取，关联条码信息的barcode_info
        /// </summary>
        [Column("material_barcode")]
        public string materialBarcode { get; set; }

        /// <summary>
        /// 批次;入库扫描条码时，从打印条码记录表中获取,关联条码信息的batch_code
        /// </summary>
        [Column("instock_batch")]
        public string instockBatch { get; set; }

        /// <summary>
        /// 物料ID
        /// </summary>
        [Column("material_id")]
        public long? materialId { get; set; }

        /// <summary>
        /// 采购订单号，入库扫描条码时获取唯一条码
        /// </summary>
        [Column("po_no")]
        public string poNo { get; set; }

        /// <summary>
        /// 生产日期;入库扫描条码时，从打印条码记录表中获取
        /// </summary>
        [Column("material_production_date")]
        public DateTime? materialProductionDate { get; set; }

        /// <summary>
        /// 计划数量
        /// </summary>
        [Column("plan_amount")]
        public decimal planAmount { get; set; }

        /// <summary>
        /// 入库数量
        /// </summary>
        [Column("instock_amount")]
        public decimal? instockAmount { get; set; }

        /// <summary>
        /// 执行状态(0待执行,1执行中,2执行完成)
        /// </summary>
        [Column("execute_status")]
        public string executeStatus { get; set; }

        /// <summary>
        /// 同步ERP状态(0:失败,1成功)
        /// </summary>
        [Column("erp_status")]
        public string erpStatus { get; set; }

        /// <summary>
        /// 同步给ERP的数量
        /// </summary>
        [Column("erp_amount")]
        public decimal? erpAmount { get; set; }

        /// <summary>
        /// 入库人
        /// </summary>
        [Column("instock_person")]
        public string instockPerson { get; set; }

        /// <summary>
        /// 入库时间
        /// </summary>
        [Column("instock_time")]
        public DateTime? instockTime { get; set; }

        /// <summary>
        /// 入库方式（1：人工入库 2：AGV入库 ）
        /// </summary>
        [Column("instock_way")]
        public string instockWay { get; set; }

        /// <summary>
        /// 使用机台名称;入库扫描条码时，从打印条码记录表中获取
        /// </summary>
        [Column("machine_name")]
        public string machineName { get; set; }

        /// <summary>
        /// 质检状态(0:待质检,1:合格,2:NG)
        /// </summary>
        [Column("quality_status")]
        public string qualityStatus { get; set; }

        /// <summary>
        /// 每托数量
        /// </summary>
        [Column("stack_amount")]
        public decimal? stackAmount { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [Column("create_by")]
        public string createBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("create_date")]
        public DateTime? createDate { get; set; }

        /// <summary>
        /// 最后更新人
        /// </summary>
        [Column("update_by")]
        public string updateBy { get; set; }

        /// <summary>
        /// 最后更新时间
        /// </summary>
        [Column("update_date")]
        public DateTime? updateDate { get; set; }

        /// <summary>
        /// 有效标记
        /// </summary>
        [Column("active_flag")]
        public string activeFlag { get; set; }

        /// <summary>
        /// 采购订单行项目
        /// </summary>
        [Column("po_line")]
        public string poLine { get; set; }
    }
}

