
//-----------------------------------------------------------------------
//<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("mes_base_barcode_info")]
    public class MesBaseBarcodeInfo
    {
        [Column("complete_flag")]
        public string completeFlag { get; set; }
        [Column("purchase_order_id")]
        public int? PurchaseOrderId { get; set; }
        [Key]
        [Column("barcode_id")]
        public long barcodeId { get; set; }

        /// <summary>
        /// 打印时间
        /// </summary>
        [Column("print_time")]
        public DateTime? printTime { get; set; }

        /// <summary>
        /// 打印人
        /// </summary>
        [Column("print_person")]
        public string printPerson { get; set; }

        /// <summary>
        /// 打印标识(0否1是)
        /// </summary>
        [Column("print_flag")]
        public string printFlag { get; set; }

        /// <summary>
        /// 批次标识(0否，1是);在打印时，如果物料已设置，则根据物料的批次信息，如果没有设置则在此需要选择，选择物料等信息保存后同步设置物料信息。
        /// </summary>
        [Column("batch_flag")]
        public string batchFlag { get; set; }

        /// <summary>
        /// 条码类型（1原材料,2半成品,3成品,4背板）
        /// </summary>
        [Column("barcode_type")]
        public string barcodeType { get; set; }

        /// <summary>
        /// 条码内容;如果是按单个物料贴，则一个物料一个条码，如果是按批次贴，则条码跟批次代码相同
        /// </summary>
        [Column("barcode_info")]
        public string barcodeInfo { get; set; }

        /// <summary>
        /// 批次代码
        /// </summary>
        [Column("batch_code")]
        public string batchCode { get; set; }

        /// <summary>
        /// 托盘RFID代码
        /// </summary>
        [Column("pallet_info_code")]
        public string palletInfoCode { get; set; }

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

        /// <summary>
        /// 供应商ID
        /// </summary>
        [Column("manufacturer_id")]
        public long? manufacturerId { get; set; }

        /// <summary>
        /// 数量;如果是批次需要输入此字段
        /// </summary>
        [Column("amount")]
        public decimal? amount { get; set; }

        /// <summary>
        /// 打印数量
        /// </summary>
        [Column("print_number")]
        public int? printNumber { get; set; }

        /// <summary>
        /// 打印机台名称，打印时获取
        /// </summary>
        [Column("machine_name")]
        public string machineName { get; set; }

        /// <summary>
        /// 采购订单号;适合原材料入库时
        /// </summary>
        [Column("po_no")]
        public string poNo { get; set; }

        /// <summary>
        /// 生产日期;打印时根据领料单选择输入
        /// </summary>
        [Column("production_date")]
        public DateTime? productionDate { get; set; }

        /// <summary>
        /// 接受日期;打印时的系统日期
        /// </summary>
        [Column("accepted_date")]
        public DateTime? acceptedDate { get; set; }

        /// <summary>
        /// 最晚出库日期;可以直接输入，也可以根据日限计算
        /// </summary>
        [Column("last_outstock_date")]
        public DateTime? lastOutstockDate { get; set; }

        /// <summary>
        /// 生产计划编号，关联mes_pd_product_plan的plan_code;适合生产出入库等
        /// </summary>
        [Column("plan_code")]
        public string planCode { get; set; }

        /// <summary>
        /// 生产计划明细编号，关联mes_product_plan_detail的plan_detail_code;适合生产出入库等
        /// </summary>
        [Column("plan_detail_code")]
        public string planDetailCode { get; set; }

        /// <summary>
        /// 销售订单ID
        /// </summary>
        [Column("sale_order_id")]
        public long? saleOrderId { get; set; }

        /// <summary>
        /// 销售订单编号;适合生产出入库等
        /// </summary>
        [Column("saleorder_code")]
        public string saleorderCode { get; set; }

        /// <summary>
        /// 项目号
        /// </summary>
        [Column("project_no")]
        public string projectNo { get; set; }

        /// <summary>
        /// 流水号
        /// </summary>
        [Column("serial_number")]
        public string serialNumber { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Column("remark")]
        public string remark { get; set; }

        /// <summary>
        /// 绑定状态(1绑定，0解绑)
        /// </summary>
        [Column("bind_status")]
        public string bindStatus { get; set; }

        /// <summary>
        /// 绑定托盘的人
        /// </summary>
        [Column("bind_by")]
        public string bindBy { get; set; }

        /// <summary>
        /// 绑定托盘时间
        /// </summary>
        [Column("bind_time")]
        public DateTime? bindTime { get; set; }

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

        /// <summary>
        /// 更新时间
        /// </summary>
        [Column("update_time")]
        public DateTime? updateTime { get; set; }

        /// <summary>
        /// 绑定的物料条码（用来拆分绑定使用）
        /// </summary>
        [Column("bind_barcode")]
        public string bindBarcode { get; set; }

        [Column("safe_flag")]
        public string safeFlag { get; set; }
    }
}

