using System.ComponentModel.DataAnnotations;
namespace RB_MES_API.Models.Cloud
{
    /// <summary>
    /// 生产订单
    /// </summary>  
    public class PRD_MO
    {
        /// <summary>
        /// 实体主键（无需填写，保存时自动添加）
        /// </summary>
        public int FID { get; set; } 
        /// <summary>
        /// 单据类型  (必填项)
        /// </summary>
        [StringLength(36)]
        public Dictionary<string, string> FBillType { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
        /// <summary>
        /// 单据日期  (必填项)
        /// </summary>
        public DateTime FDate { get; set; }
        /// <summary>
        /// 生产组织  (必填项)
        /// </summary>
        [StringLength(36)]
        public Dictionary<string, string> FPrdOrgId { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
        /// <summary>
        /// 生产车间  
        /// </summary>
        [StringLength(36)]
        public Dictionary<string, string> FWorkShopID0 { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
        /// <summary>
        /// 计划组  
        /// </summary>
        [StringLength(36)]
        public Dictionary<string, string> FWorkGroupId { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
        /// <summary>
        /// 计划员  
        /// </summary>
        [StringLength(36)]
        public Dictionary<string, string> FPlannerID { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
        /// <summary>
        /// 货主类型  (必填项)
        /// </summary>
        [StringLength(36)]
        public string FOwnerTypeId { get; set; } = "";
        /// <summary>
        /// 是否返工
        /// </summary>
        public bool FIsRework { get; set; } = false;
        /// <summary>
        /// 销售业务类型  
        /// </summary>
        [StringLength(36)]
        public string FBusinessType { get; set; } = "";
        /// <summary>
        /// 货主  
        /// </summary>
        [StringLength(36)]
        public Dictionary<string, string> FOwnerId { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
        /// <summary>
        /// 受托
        /// </summary>
        public bool FTrustteed { get; set; } = false;
        /// <summary>
        /// 备注  
        /// </summary>
        [StringLength(36)]
        public string FDescription { get; set; } 
        /// <summary>
        /// 组织受托加工
        /// </summary>
        public bool FIsEntrust { get; set; } = false;
        /// <summary>
        /// 委托组织  
        /// </summary>
        [StringLength(36)]
        public Dictionary<string, string> FEnTrustOrgId { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
        /// <summary>
        /// 用料清单展开  (必填项)  
        /// </summary>
        [StringLength(36)]
        public string FPPBOMType { get; set; } 
        /// <summary>
        /// 生产发料
        /// </summary>
        public bool FIssueMtrl { get; set; } = false;
        /// <summary>
        /// 期初生产订单
        /// </summary>
        public bool FIsQCMO { get; set; } = false;




        /// <summary>
        /// 明细
        /// </summary>
        public class FTreeEntity 
        {
            /// <summary>
            /// 实体主键（无需填写，保存时自动添加）
            /// </summary>
            public int FEntryId { get; set; } 
            /// <summary>
            /// 产品类型  (必填项)  
            /// </summary>
            [StringLength(36)]
            public string FProductType { get; set; }
            /// <summary>
            /// 物料编码   (必填项)
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FMaterialId { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
            /// <summary>
            /// 生产车间   
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FWorkShopID { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
            /// <summary>
            /// 单位  (必填项)   
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FUnitId { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
            /// <summary>
            /// 数量
            /// </summary>
            public int FQty { get; set; } 
            /// <summary>
            /// 成品数量
            /// </summary>
            public int FYieldQty { get; set; } 
            /// <summary>
            /// 计划开工时间  (必填项)
            /// </summary>
            public DateTime FPlanStartDate { get; set; }
            /// <summary>
            /// 计划完工时间  (必填项)
            /// </summary>
            public DateTime FPlanFinishDate { get; set; }
            /// <summary>
            /// 需求组织   
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FRequestOrgId { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
            /// <summary>
            /// BOM版本      
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FBomId { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
            /// <summary>
            /// 倒冲领料
            /// </summary>
            public bool FISBACKFLUSH { get; set; } = false;
            /// <summary>
            /// 批号      
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FLot { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
            /// <summary>
            /// 入库组织  (必填项)      
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FStockInOrgId { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
            /// <summary>
            /// 基本单位成品数量
            /// </summary>
            public int FBaseYieldQty { get; set; }
            /// <summary>
            /// 需求类型  (必填项)  
            /// </summary>
            [StringLength(36)]
            public string FReqType { get; set; }
            /// <summary>
            /// 需求优先级   
            /// </summary>
            public int FPriority { get; set; }
            /// <summary>
            /// 备料套数       
            /// </summary>
            public int FSTOCKREADY { get; set; } 
            /// <summary>
            /// 基本单位备料数量       
            /// </summary>
            public int FBaseStockReady { get; set; } 
            /// <summary>
            /// 基本单位返修数量       
            /// </summary>
            public int FBaseRepairQty { get; set; }
            /// <summary>
            /// 返修数量       
            /// </summary>
            public int FRepairQty { get; set; } 
            /// <summary>
            /// 基本单位报废品入库选单数量       
            /// </summary>
            public int FBaseStockInScrapSelQty { get; set; } 
            /// <summary>
            /// 报废品入库选单数量       
            /// </summary>
            public int FStockInScrapSelQty { get; set; }
            /// <summary>
            /// 基本单位报废品入库数量       
            /// </summary>
            public int FBaseStockInScrapQty { get; set; }
            /// <summary>
            /// 报废品入库数量        
            /// </summary>
            public int FStockInScrapQty { get; set; }
            /// <summary>
            /// 基本单位汇报完成数量        
            /// </summary>
            public int FBaseRptFinishQty { get; set; }
            /// <summary>
            /// 汇报完成数量        
            /// </summary>
            public int FRptFinishQty { get; set; } 
            /// <summary>
            /// 计划跟踪号   
            /// </summary>
            [StringLength(36)]
            public string FMTONO { get; set; } 
            /// <summary>
            /// 不合格品入库选单数量        
            /// </summary>
            public int FStockInFailSelAuxQty { get; set; } 
            /// <summary>
            /// 入库上限比例        
            /// </summary>
            public int FStockInUlRatio { get; set; }
            /// <summary>
            /// 辅助属性        
            /// </summary>
            public class FAuxPropId 
            {
                [StringLength(36)]
                public Dictionary<string, string> FAUXPROPID__FF100002 { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
            }
            /// <summary>
            /// 入库货主类型   
            /// </summary>
            [StringLength(36)]
            public string FInStockOwnerTypeId { get; set; } 
            /// <summary>
            /// 基本单位入库上限        
            /// </summary>
            public int FBaseStockInLimitH { get; set; }
            /// <summary>
            /// 入库货主   
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FInStockOwnerId { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
            /// <summary>
            /// 入库类型-推入库单用   
            /// </summary>
            [StringLength(36)]
            public string FInStockType { get; set; } 
            /// <summary>
            /// 入库下限比例        
            /// </summary>
            public int FStockInLlRatio { get; set; }
            /// <summary>
            /// 产品检验
            /// </summary>
            public bool FCheckProduct { get; set; } = false;
            /// <summary>
            /// 产出序列  
            /// </summary>
            [StringLength(36)]
            public string FOutPutOptQueue { get; set; } 
            /// <summary>
            /// 基本单位入库下限        
            /// </summary>
            public int FBaseStockInLimitL { get; set; } 
            /// <summary>
            /// 基本单位数量        
            /// </summary>
            public int FBaseUnitQty { get; set; } 
            /// <summary>
            /// 汇报选单数量        
            /// </summary>
            public int FRepQuaSelAuxQty { get; set; } 
            /// <summary>
            /// 合格数量        
            /// </summary>
            public int FRepQuaAuxQty { get; set; } 
            /// <summary>
            /// 汇报不合格选单数量        
            /// </summary>
            public int FRepFailSelAuxQty { get; set; } 
            /// <summary>
            /// 备注  
            /// </summary>
            [StringLength(36)]
            public string FMemoItem { get; set; }
            /// <summary>
            /// 工艺路线   
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FRoutingId { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
            /// <summary>
            /// 不合格数量        
            /// </summary>
            public int FRepFailAuxQty { get; set; } 
            /// <summary>
            /// 合格品入库数量        
            /// </summary>
            public int FStockInQuaAuxQty { get; set; }
            /// <summary>
            /// 合格品入库选单数量        
            /// </summary>
            public int FStockInQuaSelAuxQty { get; set; }
            /// <summary>
            /// 返工品入库选单数量        
            /// </summary>
            public int FStockInReMadeSelQty { get; set; } 
            /// <summary>
            /// 不合格品入库数量        
            /// </summary>
            public int FStockInFailAuxQty { get; set; }
            /// <summary>
            /// 基本单位合格品入库选单数量           
            /// </summary>
            public int FStockInQuaSelQty { get; set; } 
            /// <summary>
            /// 基本单位合格品入库数量           
            /// </summary>
            public int FStockInQuaQty { get; set; } 
            /// <summary>
            /// 基本单位   
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FBaseUnitId { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
            /// <summary>
            /// 基本单位不合格品入库选单数量           
            /// </summary>
            public int FStockInFailSelQty { get; set; } 
            /// <summary>
            /// 仓库   
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FStockId { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
            /// <summary>
            /// 基本单位不合格品入库数量           
            /// </summary>
            public int FStockInFailQty { get; set; } 
            /// <summary>
            /// 基本单位不合格品入库数量           
            /// </summary>
            public int FRepQuaSelQty { get; set; } 
            /// <summary>
            /// 仓位   
            /// </summary>
            public class FStockLocId 
            {
                [StringLength(36)]
                public Dictionary<string, string> FSTOCKLOCID__FF100001 { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
                [StringLength(36)]
                public Dictionary<string, string> FSTOCKLOCID__FF100002 { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
            }
            /// <summary>
            /// 基本单位合格数量           
            /// </summary>
            public int FRepQuaQty { get; set; } 
            /// <summary>
            /// 入库上限           
            /// </summary>
            public int FStockInLimitH { get; set; } 
            /// <summary>
            /// 基本单位汇报不合格选单数量           
            /// </summary>
            public int FRepFailSelQty { get; set; } 
            /// <summary>
            /// 基本单位不合格数量           
            /// </summary>
            public int FRepFailQty { get; set; }
            /// <summary>
            /// 入库下限           
            /// </summary>
            public int FStockInLimitL { get; set; } 
            /// <summary>
            /// 产出工序           
            /// </summary>
            public int FOperId { get; set; }
            /// <summary>
            /// 产出作业编码   
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FProcessId { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
            /// <summary>
            /// 成本权重           
            /// </summary>
            public int FCostRate { get; set; }
            /// <summary>
            /// 生成方式  (必填项)  
            /// </summary>
            [StringLength(36)]
            public string FCreateType { get; set; }
            /// <summary>
            /// 成品率%           
            /// </summary>
            public int FYieldRate { get; set; }
            /// <summary>
            /// 组别          
            /// </summary>
            public int FGroup { get; set; }
            /// <summary>
            /// 未入库数量          
            /// </summary>
            public int FNoStockInQty { get; set; } 
            /// <summary>
            /// 父级行主键   
            /// </summary>
            [StringLength(36)]
            public string FParentRowId { get; set; }
            /// <summary>
            /// 行展开类型          
            /// </summary>
            public int FRowExpandType { get; set; }
            /// <summary>
            /// 基本单位未入库数量          
            /// </summary>
            public int FBaseNoStockInQty { get; set; }
            /// <summary>
            /// 行标识   
            /// </summary>
            [StringLength(36)]
            public string FRowId { get; set; }
            /// <summary>
            /// 产线   
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FREMWorkShopId { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
            /// <summary>
            /// 排产序号          
            /// </summary>
            public int FScheduleSeq { get; set; }
            /// <summary>
            /// 结案类型   
            /// </summary>
            [StringLength(36)]
            public string FCloseType { get; set; }
            /// <summary>
            /// 排程开工时间
            /// </summary>
            public DateTime FScheduleStartTime { get; set; }
            /// <summary>
            /// 结案人   
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FForceCloserId { get; set; } = new Dictionary<string, string>() {
            { "FUserID",""}
        };
            /// <summary>
            /// 排程完工时间
            /// </summary>
            public DateTime FScheduleFinishTime { get; set; }
            /// <summary>
            /// 序列号单位   
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FSNUnitID { get; set; } = new Dictionary<string, string>() {
            { "FNumber",""}
        };
            /// <summary>
            /// 序列号单位数量          
            /// </summary>
            public int FSNQty { get; set; } 
            /// <summary>
            /// 排程工序拆分数          
            /// </summary>
            public int FScheduleProcSplit { get; set; } 
            /// <summary>
            /// 合格品退库数量          
            /// </summary>
            public int FReStkQuaQty { get; set; }
            /// <summary>
            /// 基本合格品退库数量          
            /// </summary>
            public int FBaseReStkQuaQty { get; set; } 
            /// <summary>
            /// 不合格品退库数量          
            /// </summary>
            public int FReStkFailQty { get; set; } 
            /// <summary>
            /// 基本不合格品退库数量          
            /// </summary>
            public int FBaseReStkFailQty { get; set; } 
            /// <summary>
            /// 报废品退库数量          
            /// </summary>
            public int FReStkScrapQty { get; set; } 
            /// <summary>
            /// 基本报废品退库数量          
            /// </summary>
            public int FBaseReStkScrapQty { get; set; } 
            /// <summary>
            /// 返工品退库数量          
            /// </summary>
            public int FReStkReMadeQty { get; set; }
            /// <summary>
            /// 返工品入库数量          
            /// </summary>
            public int FStockInReMadeQty { get; set; }
            /// <summary>
            /// 基本单位返工品退库数量          
            /// </summary>
            public int FBaseReStkReMadeQty { get; set; } 
            /// <summary>
            /// 排产状态    (必填项)
            /// </summary>
            [StringLength(36)]
            public string FScheduleStatus { get; set; } 
            /// <summary>
            /// 领料状态
            /// </summary>
            [StringLength(36)]
            public string FPickMtrlStatus { get; set; }
            /// <summary>
            /// 是否手工新增联副产品          
            /// </summary>
            public int FISNEWLC { get; set; }
            /// <summary>
            /// 源拆分订单编号
            /// </summary>
            [StringLength(36)]
            public string FSrcSplitBillNo { get; set; } 
            /// <summary>
            /// 源拆分订单行号          
            /// </summary>
            public int FSrcSplitSeq { get; set; } 
            /// <summary>
            /// 源拆分订单分录内码          
            /// </summary>
            public int FSrcSplitEntryId { get; set; }
            /// <summary>
            /// 源拆分生产订单内码          
            /// </summary>
            public int FSrcSplitId { get; set; } 
            /// <summary>
            /// 上级订单BOM分录内码          
            /// </summary>
            public int FSRCBOMENTRYID { get; set; }
            /// <summary>
            /// 变更标志
            /// </summary>
            public bool FMOChangeFlag { get; set; } = false;
            /// <summary>
            /// 基本单位返工品入库选单数量          
            /// </summary>
            public int FBaseStockInReMadeSelQty { get; set; } 
            /// <summary>
            /// 强制结案原因
            /// </summary>
            [StringLength(36)]
            public string FCloseReason { get; set; } 
            /// <summary>
            /// 首检
            /// </summary>
            public bool FIsFirstInspect { get; set; } = false;
            /// <summary>
            /// 首检状态  (必填项)
            /// </summary>
            [StringLength(36)]
            public string FFirstInspectStatus { get; set; } 
            /// <summary>
            /// 计划确认人   
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FConfirmId { get; set; } = new Dictionary<string, string>() {
            { "FUserID",""}
        };
            /// <summary>
            /// 下达人   
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FReleaseId { get; set; } = new Dictionary<string, string>() {
            { "FUserID",""}
        };
            /// <summary>
            /// 开工人   
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FStartID { get; set; } = new Dictionary<string, string>() {
            { "FUserID",""}
        };
            /// <summary>
            /// 完工人   
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FFinishId { get; set; } = new Dictionary<string, string>() {
            { "FUserID",""}
        };
            /// <summary>
            /// 基本单位样本破坏数          
            /// </summary>
            public int FBaseSampleDamageQty { get; set; }
            /// <summary>
            /// 样本破坏数          
            /// </summary>
            public int FSampleDamageQty { get; set; }
            /// <summary>
            /// 启用日排产
            /// </summary>
            public bool FISENABLESCHEDULE { get; set; } = false;
            /// <summary>
            /// BOM展开路径  
            /// </summary>
            [StringLength(36)]
            public string FPathEntryId { get; set; } 
            /// <summary>
            /// 用料清单分录内码          
            /// </summary>
            public int FPPBOMENTRYID { get; set; }
            /// <summary>
            /// BOM分录内码          
            /// </summary>
            public int FBOMENTRYID { get; set; } 
            /// <summary>
            /// 用料清单类型  
            /// </summary>
            [StringLength(36)]
            public string FSrcFormID { get; set; }
            /// <summary>
            /// 已计划运算
            /// </summary>
            public bool FIsMRP { get; set; } = false;
        }



        /// <summary>
        /// 序列号子单据体
        /// </summary>
        public class FSerialSubEntity
        {
            /// <summary>
            /// 实体主键（无需填写，保存时自动添加）
            /// </summary>
            public int FDetailID { get; set; } 
            /// <summary>
            /// 数量
            /// </summary>
            public int FSNQty1 { get; set; } 
            /// <summary>
            /// 序列号  
            /// </summary>
            [StringLength(36)]
            public string FSerialNo { get; set; } 
            /// <summary>
            /// 序列号   
            /// </summary>
            [StringLength(36)]
            public Dictionary<string, string> FSerialId { get; set; } = new Dictionary<string, string>() {
            { "FNUMBER",""}
        };
            /// <summary>
            /// 汇报选单数量
            /// </summary>
            public int FSNRptSelQty { get; set; } 
            /// <summary>
            ///  入库选单数量
            /// </summary>
            public int FSNStockInSelQty { get; set; } 
            /// <summary>
            /// 备注  
            /// </summary>
            [StringLength(36)]
            public string FSerialNote { get; set; } 
            /// <summary>
            ///  基本单位数量
            /// </summary>
            public int FBaseSNQty { get; set; }
            /// <summary>
            ///  基本单位汇报选单数量
            /// </summary>
            public int FBaseSNRptSelQty { get; set; } 
            /// <summary>
            ///  基本单位入库选单数量
            /// </summary>
            public int FBaseSNStockInSelQty { get; set; }
        }




            /// <summary>
            /// 排产明细表体
            /// </summary>
            public class FScheduledEntity
        {
            /// <summary>
            /// 实体主键（无需填写，保存时自动添加）
            /// </summary>
            public int FEntryID { get; set; }
            /// <summary>
            /// 发料数量
            /// </summary>
            public int FDIssueQty { get; set; }
            /// <summary>
            /// 齐套数量1
            /// </summary>
            public int FMatchQty1 { get; set; } 
            /// <summary>
            /// 差异数
            /// </summary>
            public int FDIFFERQTY { get; set; }
            /// <summary>
            /// 上线数量
            /// </summary>
            public int FFINISHEDQTY { get; set; }
            /// <summary>
            /// 齐套数量2
            /// </summary>
            public int FMatchQty2 { get; set; }
            /// <summary>
            /// 基本单位差异数
            /// </summary>
            public int FBASEDIFFERQTY { get; set; } 
            /// <summary>
            /// 基本单位上线数量
            /// </summary>
            public int FBASEFINISHEDQTY { get; set; }
            /// <summary>
            /// 基本单位发料数量
            /// </summary>
            public int FBaseDIssueQty { get; set; } 
            /// <summary>
            /// 基本单位齐套数量1
            /// </summary>
            public int FBaseMatchQty1 { get; set; }
            /// <summary>
            /// 基本单位齐套数量2
            /// </summary>
            public int FBaseMatchQty2 { get; set; } 
        }
    }
}
