革博士程序V1仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

115 lines
3.9 KiB

  1. using SqlSugar;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace Models
  9. {
  10. [SugarIndex("index_{table}_code", nameof(Product.Code), OrderByType.Asc, isUnique: true)]
  11. [SugarIndex("index_{table}_m_c",
  12. nameof(Product.Material), OrderByType.Asc,
  13. nameof(Product.Color), OrderByType.Asc, isUnique: true)]
  14. public class Product : BaseTable
  15. {
  16. public string Code { get; set; }
  17. //0-绒面 1/其它-非绒面
  18. public string Material { get; set; }//材质code
  19. public int Color { get; set; }//颜色code
  20. //类别
  21. //public int ClassesId { get; set; }
  22. //[Navigate(NavigateType.ManyToOne, nameof(ClassesId))]
  23. //public Classes ClassesInfo { get; set; }
  24. //public int Len { get; set; }//数量/长度
  25. // ----
  26. public int LightValue { get; set; }//亮度
  27. public double ExposureTime { get; set; }//曝光时长
  28. public double Gain { get; set; }//增益
  29. public double TensionValue { get; set; }//张力
  30. //
  31. [SugarColumn(IsNullable = true)]
  32. public string Note { get; set; }
  33. //合格判断标准
  34. [Navigate(NavigateType.OneToMany, nameof(QualifiedLimit.Pid))]
  35. public List<QualifiedLimit> QualifiedLimitList { get; set; }
  36. //等级划分标准
  37. [Navigate(NavigateType.OneToMany, nameof(GradeLimit.Pid))]
  38. public List<GradeLimit> GradeLimitList { get; set; }
  39. //可能不用
  40. //public int MiddleSuperposition { get; set; }
  41. //public int MarginLeft { get; set; }
  42. //public int MarginRight { get; set; }
  43. //模型算法
  44. [SugarColumn(IsNullable = true)]
  45. public string ModelName { get; set; }
  46. //告警limit
  47. public double DefectAreaLimit { get; set; }//面积
  48. public int DefectCountLimit { get; set; }//瑕疵数
  49. public bool DefectPauseForUser { get; set; }//瑕疵二次确认
  50. [SqlSugar.SugarColumn(IsJson = true, IsNullable = true)]//, ColumnDataType = StaticConfig.CodeFirst_BigString)]
  51. public List<string> DefectPauseOption { get; set; } = new List<string>();//二次确认过滤瑕疵
  52. }
  53. /// <summary>
  54. /// //合格判断标准
  55. /// </summary>
  56. [SugarIndex("index_{table}_Pid_Code",
  57. nameof(QualifiedLimit.Pid), OrderByType.Asc,
  58. nameof(QualifiedLimit.Code), OrderByType.Asc, isUnique: true)]
  59. public class QualifiedLimit : BaseTable
  60. {
  61. public int Pid { get; set; }
  62. /// <summary>
  63. /// dk,xws,...
  64. /// </summary>
  65. public string Code { get; set; }
  66. public double ZXD { get; set; }//置信度
  67. public double Area { get; set; }//面积
  68. public double ContrastTop { get; set; }//对比度
  69. public double ContrastLower { get; set; }//对比度
  70. public bool IsOR { get; set; }//面积 or 对比度
  71. //临时显示用
  72. [SugarColumn(IsIgnore = true)]
  73. public string Name { get; set; }
  74. }
  75. /// <summary>
  76. /// 等级划分标准
  77. /// </summary>
  78. [SugarIndex("index_{table}_Pid_Code",
  79. nameof(GradeLimit.Pid), OrderByType.Asc,
  80. nameof(GradeLimit.Code), OrderByType.Asc, isUnique: true)]
  81. public class GradeLimit : BaseTable
  82. {
  83. public int Pid { get; set; }
  84. /// <summary>
  85. /// dk,xws,...
  86. /// </summary>
  87. public string Code { get; set; }
  88. //此等级上限缺陷数
  89. public int A { get; set; }
  90. public int B { get; set; }
  91. public int C { get; set; }
  92. public int D { get; set; }
  93. public int E { get; set; }
  94. //临时显示用
  95. [SugarColumn(IsIgnore = true)]
  96. public string Name { get; set; }
  97. }
  98. }