using SqlSugar; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Models { [SugarIndex("index_{table}_code", nameof(Product.Code), OrderByType.Asc, isUnique: true)] [SugarIndex("index_{table}_m_c", nameof(Product.Material), OrderByType.Asc, nameof(Product.Color), OrderByType.Asc, isUnique: true)] public class Product : BaseTable { public string Code { get; set; } //0-绒面 1/其它-非绒面 public string Material { get; set; }//材质code public int Color { get; set; }//颜色code /// /// 名称 /// [SugarColumn(IsNullable = true)] public string Name { get; set; } /// /// 规格 /// [SugarColumn(IsNullable = true)] public string Spec { get; set; } /// /// 颜色名称 /// [SugarColumn(IsNullable = true)] public string ColorName { get; set; }//颜色code /// /// 颜色值 /// [SugarColumn(IsNullable = true)] public string ColorValue { get; set; }//颜色code //类别 //public int ClassesId { get; set; } //[Navigate(NavigateType.ManyToOne, nameof(ClassesId))] //public Classes ClassesInfo { get; set; } //public int Len { get; set; }//数量/长度 // ---- public int LightValue { get; set; }//亮度 public double ExposureTime { get; set; }//曝光时长 public double Gain { get; set; }//增益 public double TensionValue { get; set; }//张力 // [SugarColumn(IsNullable = true)] public string Note { get; set; } //合格判断标准 [Navigate(NavigateType.OneToMany, nameof(QualifiedLimit.Pid))] public List QualifiedLimitList { get; set; } //等级划分标准 [Navigate(NavigateType.OneToMany, nameof(GradeLimit.Pid))] public List GradeLimitList { get; set; } //可能不用 //public int MiddleSuperposition { get; set; } //public int MarginLeft { get; set; } //public int MarginRight { get; set; } //模型算法 [SugarColumn(IsNullable = true)] public string ModelName { get; set; } //告警limit public double DefectAreaLimit { get; set; }//面积 public int DefectCountLimit { get; set; }//瑕疵数 public bool DefectPauseForUser { get; set; }//瑕疵二次确认 [SqlSugar.SugarColumn(IsJson = true, IsNullable = true)]//, ColumnDataType = StaticConfig.CodeFirst_BigString)] public List DefectPauseOption { get; set; } = new List();//二次确认过滤瑕疵 /// /// 缺陷计数长度 /// [SugarColumn(IsNullable = true)] public double DefectCntLength { get; set; } /// /// 缺陷警告 /// [SugarColumn(IsNullable = true)] public string WarnDefect { get; set; } /// /// 开启厚度检测 /// [SugarColumn(IsNullable = true)] public bool OpenThicknessDetection { get; set; } /// /// 厚度检测暂停距离m /// [SugarColumn(IsNullable = true)] public int ThicknessDetectionStopDis { get; set; } /// /// 剩余长度提醒 /// [SugarColumn(IsNullable = true)] public double residueWarnningLen { get; set; } } /// /// //合格判断标准 /// [SugarIndex("index_{table}_Pid_Code", nameof(QualifiedLimit.Pid), OrderByType.Asc, nameof(QualifiedLimit.Code), OrderByType.Asc, isUnique: true)] public class QualifiedLimit : BaseTable { public int Pid { get; set; } /// /// dk,xws,... /// public string Code { get; set; } public double ZXD { get; set; }//置信度 public double Area { get; set; }//面积 public double ContrastTop { get; set; }//对比度 public double ContrastLower { get; set; }//对比度 public bool IsOR { get; set; }//面积 or 对比度 //临时显示用 [SugarColumn(IsIgnore = true)] public string Name { get; set; } [SugarColumn(IsNullable = true)] public string NameCode { get; set; } [SugarColumn(IsNullable = true)] public int DefectWarnLength { get; set; } [SugarColumn(IsNullable = true)] public int DefectWarnCnt { get; set; } } /// /// 等级划分标准 /// [SugarIndex("index_{table}_Pid_Code", nameof(GradeLimit.Pid), OrderByType.Asc, nameof(GradeLimit.Code), OrderByType.Asc, isUnique: true)] public class GradeLimit : BaseTable { public int Pid { get; set; } /// /// dk,xws,... /// public string Code { get; set; } //此等级上限缺陷数 public int A { get; set; } public int B { get; set; } public int C { get; set; } public int D { get; set; } public int E { get; set; } //临时显示用 [SugarColumn(IsIgnore = true)] public string Name { get; set; } } }