
//-----------------------------------------------------------------------
//<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_saleorder")]
    public class WmsProductStockSaleorder
    {

        [Key]
        [Column("product_stock_saleorder_id")]
        public long productStockSaleorderId { get; set; }

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

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

        /// <summary>
        /// 库存类型(2半成品，3成品)
        /// </summary>
        [Column("stock_type")]
        public string stockType { get; set; }

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

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

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

        /// <summary>
        /// 已出库数量（库管或agv出库的数量）
        /// </summary>
        [Column("outstock_amount")]
        public decimal? outstockAmount { get; set; }

        /// <summary>
        /// 确认数量（在一楼最终扫码确认出库的数量）
        /// </summary>
        [Column("confirm_amount")]
        public decimal? confirmAmount { 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; }
    }
}

