
//-----------------------------------------------------------------------
//<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_product_outstock")]
    public class WmsProductOutstock
    {

        [Key]
        [Column("product_outstock_id")]
        public long productOutstockId { get; set; }

        /// <summary>
        /// 任务编号
        /// </summary>
        [Column("task_code")]
        public string taskCode { get; set; }

        /// <summary>
        /// 仓库ID;领料时需要保存
        /// </summary>
        [Column("warehouse_id")]
        public long warehouseId { get; set; }

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

        /// <summary>
        /// 成品类型（2半成品,3成品）
        /// </summary>
        [Column("product_type")]
        public string productType { get; set; }

        /// <summary>
        /// 操作类型(0自动,1人工,2强制,3调度)
        /// </summary>
        [Column("operation_type")]
        public string operationType { get; set; }

        /// <summary>
        /// 出库类型(1销售出库 9其他出库)
        /// </summary>
        [Column("outstock_type")]
        public string outstockType { get; set; }

        /// <summary>
        /// 计划编号,关联pd_base_plan_info的plan_code
        /// </summary>
        [Column("plan_code")]
        public string planCode { get; set; }

        /// <summary>
        /// 计划明细编号,关联pd_base_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>
        /// 成品ID，关联物料信息主键
        /// </summary>
        [Column("product_id")]
        public long? productId { get; set; }

        /// <summary>
        /// 成品批次
        /// </summary>
        [Column("product_batch")]
        public string productBatch { get; set; }

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

        /// <summary>
        /// 出库目的地
        /// </summary>
        [Column("end_station_code")]
        public string endStationCode { get; set; }

        /// <summary>
        /// 申请数量
        /// </summary>
        [Column("apply_qty")]
        public decimal? applyQty { get; set; }

        /// <summary>
        /// 已出数量
        /// </summary>
        [Column("outstock_qty")]
        public decimal? outstockQty { get; set; }

        /// <summary>
        /// 申请原因
        /// </summary>
        [Column("apply_reason")]
        public string applyReason { get; set; }

        /// <summary>
        /// 审核原因
        /// </summary>
        [Column("audit_reason")]
        public string auditReason { get; set; }

        /// <summary>
        /// 审核状态(0待审核,1审核通过,2审核未通过)
        /// </summary>
        [Column("audit_status")]
        public string auditStatus { get; set; }

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

        /// <summary>
        /// 申请人
        /// </summary>
        [Column("apply_by")]
        public string applyBy { get; set; }

        /// <summary>
        /// 申请时间
        /// </summary>
        [Column("apply_date")]
        public DateTime? applyDate { get; set; }

        /// <summary>
        /// 审核人
        /// </summary>
        [Column("audit_by")]
        public string auditBy { get; set; }

        /// <summary>
        /// 审核时间
        /// </summary>
        [Column("audit_date")]
        public DateTime? auditDate { 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("begin_time")]
        public DateTime? beginTime { get; set; }

        /// <summary>
        /// 执行结束时间
        /// </summary>
        [Column("end_time")]
        public DateTime? endTime { get; set; }
    }
}

