|
- 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
- /// <summary>
- /// 名称
- /// </summary>
- [SugarColumn(IsNullable = true)]
- public string Name { get; set; }
- /// <summary>
- /// 规格
- /// </summary>
- [SugarColumn(IsNullable = true)]
- public string Spec { get; set; }
- /// <summary>
- /// 颜色名称
- /// </summary>
- [SugarColumn(IsNullable = true)]
- public string ColorName { get; set; }//颜色code
- /// <summary>
- /// 颜色值
- /// </summary>
- [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<QualifiedLimit> QualifiedLimitList { get; set; }
- //等级划分标准
- [Navigate(NavigateType.OneToMany, nameof(GradeLimit.Pid))]
- public List<GradeLimit> 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<string> DefectPauseOption { get; set; } = new List<string>();//二次确认过滤瑕疵
-
- /// <summary>
- /// 缺陷计数长度
- /// </summary>
- [SugarColumn(IsNullable = true)]
- public double DefectCntLength { get; set; }
- /// <summary>
- /// 缺陷警告
- /// </summary>
- [SugarColumn(IsNullable = true)]
- public string WarnDefect { get; set; }
-
- /// <summary>
- /// 开启厚度检测
- /// </summary>
- [SugarColumn(IsNullable = true)]
- public bool OpenThicknessDetection { get; set; }
- /// <summary>
- /// 厚度检测暂停距离m
- /// </summary>
- [SugarColumn(IsNullable = true)]
- public int ThicknessDetectionStopDis { get; set; }
- /// <summary>
- /// 剩余长度提醒
- /// </summary>
- [SugarColumn(IsNullable = true)]
- public double residueWarnningLen { get; set; }
- }
-
- /// <summary>
- /// //合格判断标准
- /// </summary>
- [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; }
- /// <summary>
- /// dk,xws,...
- /// </summary>
- 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; }
- }
- /// <summary>
- /// 等级划分标准
- /// </summary>
- [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; }
- /// <summary>
- /// dk,xws,...
- /// </summary>
- 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; }
- }
-
- }
|