using System; using FreeSql.DataAnnotations; using ZhonTai.Admin.Core.Entities; using NPP.SmartSchedue.Api.Contracts.Core.Consts; namespace NPP.SmartSchedue.Api.Contracts.Domain.Equipment; /// /// 设备校验实体 /// [Table(Name = DbConsts.AEMTableNamePrefix + "equipment_calibration")] [Index("idx_{tablename}_01", nameof(TenantId) + "," + nameof(EquipmentId) + "," + nameof(CalibrationDate))] [Index("idx_{tablename}_02", nameof(TenantId) + "," + nameof(CalibrationType))] [Index("idx_{tablename}_03", nameof(TenantId) + "," + nameof(Status))] public partial class EquipmentCalibrationEntity : EntityTenant { /// /// 设备ID /// public long EquipmentId { get; set; } /// /// 设备名称 /// [Column(StringLength = 100)] public string EquipmentName { get; set; } /// /// 校验类型 /// [Column(StringLength = 50)] public string CalibrationType { get; set; } /// /// 校验日期 /// public DateTime CalibrationDate { get; set; } /// /// 校验开始时间 /// public DateTime? StartTime { get; set; } /// /// 校验结束时间 /// public DateTime? EndTime { get; set; } /// /// 校验时长(小时) /// public decimal? CalibrationHours { get; set; } /// /// 校验人员ID /// public long? CalibrationPersonId { get; set; } /// /// 校验人员姓名 /// [Column(StringLength = 50)] public string CalibrationPersonName { get; set; } /// /// 校验机构 /// [Column(StringLength = 200)] public string CalibrationInstitution { get; set; } /// /// 校验证书编号 /// [Column(StringLength = 100)] public string CertificateNumber { get; set; } /// /// 校验结果 /// [Column(StringLength = 50)] public string CalibrationResult { get; set; } /// /// 校验精度 /// [Column(StringLength = 100)] public string CalibrationAccuracy { get; set; } /// /// 校验费用 /// public decimal? CalibrationCost { get; set; } /// /// 状态(0-计划中,1-进行中,2-已完成,3-已取消) /// public int Status { get; set; } = 0; /// /// 是否计划校验 /// public bool IsPlanned { get; set; } = false; /// /// 计划校验周期(天) /// public int? PlannedCycle { get; set; } /// /// 下次计划校验日期 /// public DateTime? NextPlannedDate { get; set; } /// /// 校验标准 /// [Column(StringLength = 200)] public string CalibrationStandard { get; set; } /// /// 校验方法 /// [Column(StringLength = 500)] public string CalibrationMethod { get; set; } /// /// 校验环境要求 /// [Column(StringLength = 500)] public string EnvironmentalRequirements { get; set; } /// /// 校验报告路径 /// [Column(StringLength = 500)] public string ReportPath { get; set; } /// /// 备注 /// [Column(StringLength = 500)] public string Remark { get; set; } } /// /// 校验类型枚举 /// public static class CalibrationType { /// /// 定期校验 /// public const string Regular = "Regular"; /// /// 首次校验 /// public const string Initial = "Initial"; /// /// 重新校验 /// public const string Recalibration = "Recalibration"; /// /// 临时校验 /// public const string Temporary = "Temporary"; /// /// 强制校验 /// public const string Mandatory = "Mandatory"; } /// /// 校验结果枚举 /// public static class CalibrationResult { /// /// 合格 /// public const string Pass = "Pass"; /// /// 不合格 /// public const string Fail = "Fail"; /// /// 部分合格 /// public const string Partial = "Partial"; /// /// 待定 /// public const string Pending = "Pending"; } /// /// 校验状态枚举 /// public static class CalibrationStatus { /// /// 计划中 /// public const int Planned = 0; /// /// 进行中 /// public const int InProgress = 1; /// /// 已完成 /// public const int Completed = 2; /// /// 已取消 /// public const int Cancelled = 3; }