using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;

#region << 版 本 注 释 >>
/*--------------------------------------------------------------------
* 版权所有 (c) 2024 WenJY 保留所有权利。
* CLR版本：4.0.30319.42000
* 机器名称：LAPTOP-E0N2L34V
* 命名空间：SlnMesnac.Model.domain
* 唯一标识：7ad1d398-9d11-4f09-ac72-29755acaa263
*
* 创建者：WenJY
* 电子邮箱：wenjy@mesnac.com
* 创建时间：2024-04-07 17:38:47
* 版本：V1.0.0
* 描述：
*
*--------------------------------------------------------------------
* 修改人：
* 时间：
* 修改说明：
*
* 版本：V1.0.0
*--------------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
namespace SlnMesnac.Model.domain
{
    /// <summary>
    /// MES订单信息
    /// </summary>
    [SugarTable("mes_product_order"), TenantAttribute("mes")]
    public class MesProductOrder
    {
        /// <summary>
        /// 主键标识 
        ///</summary>
        [SugarColumn(ColumnName = "product_order_id", IsPrimaryKey = true, IsIdentity = true)]
        public long ProductOrderId { get; set; }
        /// <summary>
        /// 工单编号 
        ///</summary>
        [SugarColumn(ColumnName = "order_code")]
        public string OrderCode { get; set; }
        /// <summary>
        /// 销售订单ID,关联mes_sale_order的order_id;一个销售订单可以有多个生产工单 
        ///</summary>
        [SugarColumn(ColumnName = "sale_order_id")]
        public long SaleOrderId { get; set; }
        /// <summary>
        /// 销售订单标识（0否，1是）;是否有销售订单创建生产工单 
        ///</summary>
        [SugarColumn(ColumnName = "sale_order_flag")]
        public string SaleOrderFlag { get; set; }
        /// <summary>
        /// 销售订单编号 
        ///</summary>
        [SugarColumn(ColumnName = "saleorder_code")]
        public string SaleorderCode { get; set; }
        /// <summary>
        /// 销售订单行号 
        ///</summary>
        [SugarColumn(ColumnName = "saleorder_linenumber")]
        public string SaleorderLinenumber { get; set; }
        /// <summary>
        /// 项目编号 
        ///</summary>
        [SugarColumn(ColumnName = "project_no")]
        public string ProjectNo { get; set; }
        /// <summary>
        /// 物料ID,关联mes_base_material_info的material_id;如果无订单则需要选择，成品信息 
        ///</summary>
        [SugarColumn(ColumnName = "material_id")]
        public long MaterialId { get; set; }
        /// <summary>
        /// 物料bomID，关联mes_material_bom的material_bom_id;默认选择最新的正常状态的bom，可修改 
        ///</summary>
        [SugarColumn(ColumnName = "material_bom_id")]
        public long MaterialBomId { get; set; }
        /// <summary>
        /// 派工类型(1产线 2工艺路线) 
        ///</summary>
        [SugarColumn(ColumnName = "dispatch_type")]
        public string DispatchType { get; set; }
        /// <summary>
        /// 派工ID（派工类型为产线关联产线主键，派工类型为工艺路线关联工艺路线主键） 
        ///</summary>
        [SugarColumn(ColumnName = "dispatch_id")]
        public int DispatchId { get; set; }
        /// <summary>
        /// 销售数量;销售订单的销售数量，如果无订单则需要输入 
        ///</summary>
        [SugarColumn(ColumnName = "sale_amount")]
        public decimal SaleAmount { get; set; }
        /// <summary>
        /// 计划交货日期 
        ///</summary>
        [SugarColumn(ColumnName = "plan_delivery_date")]
        public DateTime? PlanDeliveryDate { get; set; }
        /// <summary>
        /// 计划数量 
        ///</summary>
        [SugarColumn(ColumnName = "plan_amount")]
        public decimal PlanAmount { get; set; }
        /// <summary>
        /// 已派工数量;派工类型是工艺路线的每个工位派工数量相同，派工类型是产线的派工数量是所有工位累加的 
        /// 默认值: 0.000000
        ///</summary>
        [SugarColumn(ColumnName = "dispatch_amount")]
        public decimal? DispatchAmount { get; set; }
        /// <summary>
        /// 完成数量 
        /// 默认值: 0.000000
        ///</summary>
        [SugarColumn(ColumnName = "complete_amount")]
        public decimal? CompleteAmount { get; set; }
        /// <summary>
        /// 发布时间 
        ///</summary>
        [SugarColumn(ColumnName = "release_time")]
        public DateTime? ReleaseTime { get; set; }
        /// <summary>
        /// 计划开始时间 
        ///</summary>
        [SugarColumn(ColumnName = "plan_begin_time")]
        public DateTime? PlanBeginTime { get; set; }
        /// <summary>
        /// 计划结束时间 
        ///</summary>
        [SugarColumn(ColumnName = "plan_end_time")]
        public DateTime? PlanEndTime { get; set; }
        /// <summary>
        /// 开始时间 
        ///</summary>
        [SugarColumn(ColumnName = "real_begin_time")]
        public DateTime? RealBeginTime { get; set; }
        /// <summary>
        /// 完成时间 
        ///</summary>
        [SugarColumn(ColumnName = "real_end_time")]
        public DateTime? RealEndTime { get; set; }
        /// <summary>
        /// 工单状态：0-待发布；1-已发布；2-已完成；3-已开始；4-暂停；8-已撤回；9-已删除 
        /// 默认值: 0
        ///</summary>
        [SugarColumn(ColumnName = "order_status")]
        public string OrderStatus { get; set; }
        /// <summary>
        /// 库存锁定标识：1-是；0-否 
        /// 默认值: 0
        ///</summary>
        [SugarColumn(ColumnName = "stock_lock_flag")]
        public string StockLockFlag { get; set; }
        /// <summary>
        /// 备注 
        ///</summary>
        [SugarColumn(ColumnName = "remark")]
        public string Remark { get; set; }
        /// <summary>
        /// 创建人 
        ///</summary>
        [SugarColumn(ColumnName = "create_by")]
        public string CreateBy { get; set; }
        /// <summary>
        /// 创建时间 
        ///</summary>
        [SugarColumn(ColumnName = "create_time")]
        public DateTime? CreateTime { get; set; }
        /// <summary>
        /// 更新人 
        ///</summary>
        [SugarColumn(ColumnName = "update_by")]
        public string UpdateBy { get; set; }
        /// <summary>
        /// 更新时间 
        ///</summary>
        [SugarColumn(ColumnName = "update_time")]
        public DateTime? UpdateTime { get; set; }
    }
}
