| | |
| | | |
| | | namespace Tiger.Model |
| | | { |
| | | /// <summary> |
| | | /// 实体:客户提供产品条码 |
| | | /// </summary> |
| | | [Description("Primary:ID")] |
| | | [DisplayName("客户提供产品条码")] |
| | | [Serializable] |
| | | [SugarTable("MES_CUST_SN")] |
| | | public class MES_CUST_SN : DbEntityWithAuth |
| | | { |
| | | #region 构造函数 |
| | | /// <summary> |
| | | /// 实体:客户提供产品条码 |
| | | /// </summary> |
| | | public MES_CUST_SN() {} |
| | | #endregion |
| | | /// <summary> |
| | | /// 实体:客户提供产品条码 |
| | | /// </summary> |
| | | [Description("Primary:ID")] |
| | | [DisplayName("客户提供产品条码")] |
| | | [Serializable] |
| | | [SugarTable("MES_CUST_SN")] |
| | | public class MES_CUST_SN : DbEntityWithAuth |
| | | { |
| | | #region 构造函数 |
| | | /// <summary> |
| | | /// 实体:客户提供产品条码 |
| | | /// </summary> |
| | | public MES_CUST_SN() { } |
| | | #endregion |
| | | |
| | | #region 公共属性 |
| | | /// <summary> |
| | | /// 客户编码 |
| | | /// </summary> |
| | | [DisplayName("客户编码")] |
| | | public string CUST_CODE { get; set; } |
| | | /// <summary> |
| | | /// 客户条码 |
| | | /// </summary> |
| | | [DisplayName("客户条码")] |
| | | public string CUST_SN { get; set; } |
| | | /// <summary> |
| | | /// 厂内流转条码 |
| | | /// </summary> |
| | | [DisplayName("厂内流转条码")] |
| | | public string FLOW_SN { get; set; } |
| | | /// <summary> |
| | | /// 工单号 |
| | | /// </summary> |
| | | [DisplayName("工单号")] |
| | | public string WORK_ORDER { get; set; } |
| | | /// <summary> |
| | | /// 备注 |
| | | /// </summary> |
| | | [DisplayName("备注")] |
| | | public string REMARK { get; set; } |
| | | #endregion |
| | | #region 公共属性 |
| | | /// <summary> |
| | | /// 客户编码 |
| | | /// </summary> |
| | | [DisplayName("客户编码")] |
| | | public string CUST_CODE { get; set; } |
| | | /// <summary> |
| | | /// 客户条码 |
| | | /// </summary> |
| | | [DisplayName("客户条码")] |
| | | public string CUST_SN { get; set; } |
| | | /// <summary> |
| | | /// 厂内流转条码(若是导入的未绑定客户条码,此字段为空) |
| | | /// </summary> |
| | | [DisplayName("厂内流转条码(若是导入的未绑定客户条码,此字段为空)")] |
| | | public string FLOW_SN { get; set; } |
| | | /// <summary> |
| | | /// 生产工单号 |
| | | /// </summary> |
| | | [DisplayName("生产工单号")] |
| | | public string WORK_ORDER { get; set; } |
| | | /// <summary> |
| | | /// 半成品物料编码 |
| | | /// </summary> |
| | | [DisplayName("半成品物料编码")] |
| | | public string ITEM_CODE { get; set; } |
| | | /// <summary> |
| | | /// 包装工单号 |
| | | /// </summary> |
| | | [DisplayName("包装工单号")] |
| | | public string PKG_ORDER { get; set; } |
| | | /// <summary> |
| | | /// 成品物料编码 |
| | | /// </summary> |
| | | [DisplayName("成品物料编码")] |
| | | public string PROD_CODE { get; set; } |
| | | /// <summary> |
| | | /// 备注 |
| | | /// </summary> |
| | | [DisplayName("备注")] |
| | | public string REMARK { get; set; } |
| | | #endregion |
| | | |
| | | #region 虚拟属性 |
| | | /*例子 |
| | | #region 虚拟属性 |
| | | /*例子 |
| | | [SugarColumn(IsIgnore = true)] |
| | | public string FieldName { get; set; } |
| | | */ |
| | | #endregion |
| | | /// <summary> |
| | | /// 是否已经绑定 |
| | | /// </summary> |
| | | [SugarColumn(IsIgnore = true)] |
| | | public bool IsBound => !string.IsNullOrEmpty(FLOW_SN) && !string.IsNullOrEmpty(CUST_SN) && FLOW_SN != CUST_SN; |
| | | /// <summary> |
| | | /// 是否厂内流转条码 |
| | | /// </summary> |
| | | [SugarColumn(IsIgnore = true)] |
| | | public bool IsFlowSn => !string.IsNullOrEmpty(FLOW_SN) && !string.IsNullOrEmpty(CUST_SN) && FLOW_SN == CUST_SN; |
| | | /// <summary> |
| | | /// 是否客户编码 |
| | | /// </summary> |
| | | [SugarColumn(IsIgnore = true)] |
| | | public bool IsCustSn => string.IsNullOrEmpty(FLOW_SN) && !string.IsNullOrEmpty(CUST_SN); |
| | | #endregion |
| | | |
| | | #region 外键属性 |
| | | /*例子 |
| | | //一对一外键导航 |
| | | [Navigate(NavigateType.OneToOne, nameof(ClassAId))]//一对一 ClassAId是MES_CUST_SN类里面的外键ID字段 |
| | | public ClassA ClassA { get; set; } //注意禁止手动赋值,只能是null |
| | | //一对多外键导航 |
| | | [Navigate(NavigateType.OneToMany, nameof(ClassA.MES_CUST_SNId))]//ClassA表中的MES_CUST_SNId |
| | | public List<ClassA> ClassAList { get; set; }//注意禁止手动赋值,只能是null |
| | | //多对多外键导航 |
| | | [Navigate(typeof(MappingClass), nameof(MappingClass.MES_CUST_SNId), nameof(MappingClass.ClassAId))]//注意顺序 |
| | | public List<ClassA> ClassAList { get; set; } //注意禁止手动赋值,只能是null |
| | | #region 外键属性 |
| | | /*例子 |
| | | //一对一外键导航 |
| | | [Navigate(NavigateType.OneToOne, nameof(ClassAId))]//一对一 ClassAId是MES_CUST_SN类里面的外键ID字段 |
| | | public ClassA ClassA { get; set; } //注意禁止手动赋值,只能是null |
| | | //一对多外键导航 |
| | | [Navigate(NavigateType.OneToMany, nameof(ClassA.MES_CUST_SNId))]//ClassA表中的MES_CUST_SNId |
| | | public List<ClassA> ClassAList { get; set; }//注意禁止手动赋值,只能是null |
| | | //多对多外键导航 |
| | | [Navigate(typeof(MappingClass), nameof(MappingClass.MES_CUST_SNId), nameof(MappingClass.ClassAId))]//注意顺序 |
| | | public List<ClassA> ClassAList { get; set; } //注意禁止手动赋值,只能是null |
| | | */ |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region 枚举变量 |
| | | /*例子 |
| | | #region 枚举变量 |
| | | /*例子 |
| | | public enum FieldNames |
| | | { |
| | | [Description("枚举描述0")] |
| | | [Description("枚举描述0")] |
| | | Enum0, |
| | | [Description("枚举描述1")] |
| | | [Description("枚举描述1")] |
| | | Enum1, |
| | | } |
| | | */ |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region 公共方法 |
| | | #region 公共方法 |
| | | |
| | | #endregion |
| | | #endregion |
| | | |
| | | }//endClass |
| | | }//endClass |
| | | } |