HouseAutofocusCalibrationDB.cs 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. using System;
  2. using SqlSugar;
  3. namespace IvfTl.Control.Entity.DBEntitys
  4. {
  5. /// <summary>
  6. /// 本地自动对焦标定结果的库内镜像实体(M2-04)。
  7. /// 依据:sql/migrations/2026-06-17-autofocus-data-layer.sql 的 house_autofocus_calibration;
  8. /// 需求文档/12 §2.7(真相源=本地 calibration.json;本表为镜像;scene 0 基准/1 日常)。
  9. /// 列名按迁移脚本的蛇形命名,用 [SugarColumn(ColumnName=...)] 显式映射(control 端其余实体
  10. /// 多为 camelCase 直映,此表为对齐中央端 MySQL 迁移列名,统一走蛇形 ColumnName)。
  11. /// scene:0=出厂基准(每 well 一条 upsert) 1=日常对焦(append,受清理周期约束,只删 scene=1)。
  12. /// </summary>
  13. [SugarTable("house_autofocus_calibration")]
  14. public partial class HouseAutofocusCalibrationDB
  15. {
  16. public HouseAutofocusCalibrationDB()
  17. {
  18. }
  19. /// <summary>自增 id。</summary>
  20. [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
  21. public long id { get; set; }
  22. /// <summary>tl 设备 sn。</summary>
  23. [SugarColumn(ColumnName = "tl_sn")]
  24. public string tlSn { get; set; }
  25. /// <summary>仓室编号(1-11,11 号为缓冲瓶无相机不对焦)。</summary>
  26. [SugarColumn(ColumnName = "house_sn")]
  27. public int houseSn { get; set; }
  28. /// <summary>well 编号(1-16)。</summary>
  29. [SugarColumn(ColumnName = "well_sn")]
  30. public int wellSn { get; set; }
  31. /// <summary>场景:0=出厂基准 1=日常对焦。</summary>
  32. [SugarColumn(ColumnName = "scene")]
  33. public int scene { get; set; }
  34. /// <summary>对焦算出的最清晰层 Z 脉冲(锚点)。</summary>
  35. [SugarColumn(ColumnName = "focus_z")]
  36. public int focusZ { get; set; }
  37. /// <summary>曝光(×100µs)。</summary>
  38. [SugarColumn(ColumnName = "exposure", IsNullable = true)]
  39. public int? exposure { get; set; }
  40. /// <summary>水平电机位置脉冲。</summary>
  41. [SugarColumn(ColumnName = "horizontal_pulse", IsNullable = true)]
  42. public int? horizontalPulse { get; set; }
  43. /// <summary>清晰度峰比(合格判据,阈值见 tl_setting.focus_peak_ratio_threshold)。</summary>
  44. [SugarColumn(ColumnName = "peak_ratio", IsNullable = true)]
  45. public decimal? peakRatio { get; set; }
  46. /// <summary>是否检到 well 圆:0 否 1 是。</summary>
  47. [SugarColumn(ColumnName = "circle_found", IsNullable = true)]
  48. public int? circleFound { get; set; }
  49. /// <summary>居中偏移百分比。</summary>
  50. [SugarColumn(ColumnName = "center_offset_pct", IsNullable = true)]
  51. public decimal? centerOffsetPct { get; set; }
  52. /// <summary>标定时间。</summary>
  53. [SugarColumn(ColumnName = "calib_time")]
  54. public DateTime calibTime { get; set; }
  55. /// <summary>结果来源(LOCAL_JSON=本地标定镜像)。</summary>
  56. [SugarColumn(ColumnName = "source")]
  57. public string source { get; set; }
  58. /// <summary>备注。</summary>
  59. [SugarColumn(ColumnName = "note", IsNullable = true)]
  60. public string note { get; set; }
  61. /// <summary>创建人。</summary>
  62. [SugarColumn(ColumnName = "create_by", IsNullable = true)]
  63. public string createBy { get; set; }
  64. /// <summary>创建时间。</summary>
  65. [SugarColumn(ColumnName = "create_time", IsNullable = true)]
  66. public DateTime? createTime { get; set; }
  67. /// <summary>修改人。</summary>
  68. [SugarColumn(ColumnName = "update_by", IsNullable = true)]
  69. public string updateBy { get; set; }
  70. /// <summary>修改时间。</summary>
  71. [SugarColumn(ColumnName = "update_time", IsNullable = true)]
  72. public DateTime? updateTime { get; set; }
  73. /// <summary>逻辑删除标记:操作时间戳(mybatis-plus 逻辑删除约定)。</summary>
  74. [SugarColumn(ColumnName = "deleted", IsNullable = true)]
  75. public DateTime? deleted { get; set; }
  76. /// <summary>操作终端。</summary>
  77. [SugarColumn(ColumnName = "platform_id", IsNullable = true)]
  78. public int? platformId { get; set; }
  79. }
  80. }