
//-----------------------------------------------------------------------
//<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_stock")]
    public class WmsProductStock
    {

        [Key]
        [Column("product_stock_id")]
        public long productStockId { get; set; }

        /// <summary>
        /// 仓库ID
        /// </summary>
        [Column("warehouse_id")]
        public long warehouseId { get; set; }

        /// <summary>
        /// 仓库楼层
        /// </summary>
        [Column("warehouse_floor")]
        public int warehouseFloor { get; set; }

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

        /// <summary>
        /// 库存类型(2半成品，3成品)
        /// </summary>
        [Column("stock_type")]
        public string stockType { 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>
        /// 质检状态(0待质检 1检验中,2质检通过,3质检不通过)
        /// </summary>
        [Column("quality_status")]
        public string qualityStatus { get; set; }

        /// <summary>
        /// 产品ID，关联物料信息的物料ID
        /// </summary>
        [Column("product_id")]
        public long? productId { 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("total_amount")]
        public decimal totalAmount { get; set; }

        /// <summary>
        /// 冻结数量
        /// </summary>
        [Column("frozen_amount")]
        public decimal frozenAmount { get; set; }

        /// <summary>
        /// 占用数量
        /// </summary>
        [Column("occupy_amount")]
        public decimal occupyAmount { 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("instock_date")]
        public DateTime? instockDate { get; set; }
    }
}

