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

        [Key]
        [Column("raw_stock_id")]
        public long rawStockId { 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>
        /// 库存类型：1原材料  2半成品
        /// </summary>
        [Column("stock_type")]
        public string stockType { get; set; }

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

        /// <summary>
        /// 入库批次号
        /// </summary>
        [Column("instock_batch")]
        public string instockBatch { get; set; }

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

        /// <summary>
        /// 入库时间;此入库时间从批次信息中获取，accepted_date
        /// </summary>
        [Column("instock_date")]
        public DateTime? instockDate { get; set; }

        /// <summary>
        /// 最晚出库时间;入库时，根据物料信“存放周期“计算出来的时间
        /// </summary>
        [Column("last_outstock_time")]
        public DateTime? lastOutstockTime { get; set; }

        /// <summary>
        /// 质检状态(0待质检,1检验中,2质检通过,3质检不通过)
        /// </summary>
        [Column("quality_status")]
        public string qualityStatus { get; set; }

        /// <summary>
        /// 完整标识(1是0否)拆分后为0
        /// </summary>
        [Column("complete_flag")]
        public string completeFlag { 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>
        /// 供应商ID
        /// </summary>
        [Column("supplier_id")]
        public long? supplierId { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [Column("create_by")]
        public string createBy { get; set; }
        [Column("safe_flag")]
        public string safeFlag { 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; }

        [Column("sale_order_id")]
        public long? saleOrderId { get; set; }
    }
}

