
//-----------------------------------------------------------------------
//<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_occupy")]
    public class WmsRawStockOccupy
    {

        [Key]
        [Column("raw_stock_occupy_id")]
        public long rawStockOccupyId { get; set; }

        /// <summary>
        /// 仓库ID
        /// </summary>
        [Column("warehouse_id")]
        public long warehouseId { 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("occupy_amount")]
        public decimal? occupyAmount { get; set; }

        /// <summary>
        /// 占用类型(1生产工单,2申请领料)
        /// </summary>
        [Column("occupy_type")]
        public string occupyType { get; set; }

        /// <summary>
        /// 根据占用类型关联占用的主键ID
        /// </summary>
        [Column("occupy_id")]
        public long? occupyId { get; set; }

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

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

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

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

