| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- namespace Admin.NET.Plugin.AiDOP.Entity.S8;
- /// <summary>
- /// 异常主表(业务实体;列表为查询该表及关联展示字段,非独立「列表视图表」)。
- /// </summary>
- [SugarTable("ado_s8_exception", "S8 异常主表")]
- [SugarIndex("uk_ado_s8_exception_tenant_factory_code", nameof(TenantId), OrderByType.Asc, nameof(FactoryId), OrderByType.Asc, nameof(ExceptionCode), OrderByType.Asc, IsUnique = true)]
- [SugarIndex("idx_ado_s8_exception_type_time", nameof(TenantId), OrderByType.Asc, nameof(FactoryId), OrderByType.Asc, nameof(ExceptionTypeCode), OrderByType.Asc, nameof(CreatedAt), OrderByType.Desc)]
- public class AdoS8Exception
- {
- [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
- public long Id { get; set; }
- [SugarColumn(ColumnName = "tenant_id", ColumnDataType = "bigint")]
- public long TenantId { get; set; }
- [SugarColumn(ColumnName = "factory_id", ColumnDataType = "bigint")]
- public long FactoryId { get; set; }
- [SugarColumn(ColumnName = "exception_code", Length = 64)]
- public string ExceptionCode { get; set; } = string.Empty;
- [SugarColumn(ColumnName = "title", Length = 256)]
- public string Title { get; set; } = string.Empty;
- [SugarColumn(ColumnName = "description", Length = 4000, IsNullable = true)]
- public string? Description { get; set; }
- [SugarColumn(ColumnName = "scene_code", Length = 64)]
- public string SceneCode { get; set; } = string.Empty;
- [SugarColumn(ColumnName = "source_type", Length = 32)]
- public string SourceType { get; set; } = "MANUAL";
- [SugarColumn(ColumnName = "status", Length = 32)]
- public string Status { get; set; } = "NEW";
- [SugarColumn(ColumnName = "severity", Length = 32)]
- public string Severity { get; set; } = "MEDIUM";
- [SugarColumn(ColumnName = "priority_score", ColumnDataType = "decimal(10,2)")]
- public decimal PriorityScore { get; set; }
- [SugarColumn(ColumnName = "priority_level", Length = 16)]
- public string PriorityLevel { get; set; } = "P3";
- [SugarColumn(ColumnName = "occurrence_dept_id", ColumnDataType = "bigint")]
- public long OccurrenceDeptId { get; set; }
- [SugarColumn(ColumnName = "responsible_dept_id", ColumnDataType = "bigint")]
- public long ResponsibleDeptId { get; set; }
- [SugarColumn(ColumnName = "responsible_group_id", ColumnDataType = "bigint", IsNullable = true)]
- public long? ResponsibleGroupId { get; set; }
- [SugarColumn(ColumnName = "assignee_id", ColumnDataType = "bigint", IsNullable = true)]
- public long? AssigneeId { get; set; }
- [SugarColumn(ColumnName = "reporter_id", ColumnDataType = "bigint", IsNullable = true)]
- public long? ReporterId { get; set; }
- [SugarColumn(ColumnName = "sla_deadline", IsNullable = true)]
- public DateTime? SlaDeadline { get; set; }
- [SugarColumn(ColumnName = "timeout_flag", ColumnDataType = "boolean")]
- public bool TimeoutFlag { get; set; }
- [SugarColumn(ColumnName = "created_at")]
- public DateTime CreatedAt { get; set; } = DateTime.Now;
- [SugarColumn(ColumnName = "updated_at", IsNullable = true)]
- public DateTime? UpdatedAt { get; set; }
- [SugarColumn(ColumnName = "assigned_at", IsNullable = true)]
- public DateTime? AssignedAt { get; set; }
- [SugarColumn(ColumnName = "closed_at", IsNullable = true)]
- public DateTime? ClosedAt { get; set; }
- /// <summary>所属模块码(S1-S7),标识异常产生于哪个业务环节</summary>
- [SugarColumn(ColumnName = "module_code", Length = 16, IsNullable = true)]
- public string? ModuleCode { get; set; }
- [SugarColumn(ColumnName = "process_node_code", Length = 64, IsNullable = true)]
- public string? ProcessNodeCode { get; set; }
- [SugarColumn(ColumnName = "related_object_code", Length = 64, IsNullable = true)]
- public string? RelatedObjectCode { get; set; }
- /// <summary>当前进行中的审批实例ID(用于并发控制)</summary>
- [SugarColumn(ColumnName = "active_flow_instance_id", IsNullable = true)]
- public long? ActiveFlowInstanceId { get; set; }
- /// <summary>当前进行中的审批业务类型(EXCEPTION_ESCALATION / EXCEPTION_CLOSURE)</summary>
- [SugarColumn(ColumnName = "active_flow_biz_type", Length = 32, IsNullable = true)]
- public string? ActiveFlowBizType { get; set; }
- [SugarColumn(ColumnName = "is_deleted", ColumnDataType = "boolean")]
- public bool IsDeleted { get; set; }
- [SugarColumn(ColumnName = "created_by", Length = 64, IsNullable = true)]
- public string? CreatedBy { get; set; }
- [SugarColumn(ColumnName = "updated_by", Length = 64, IsNullable = true)]
- public string? UpdatedBy { get; set; }
- /// <summary>异常类型编码(关联 ado_s8_exception_type.type_code)。配置化改造后新增。</summary>
- [SugarColumn(ColumnName = "exception_type_code", Length = 64, IsNullable = true)]
- public string? ExceptionTypeCode { get; set; }
- /// <summary>来源数据源 ID(自动建单时填充;人工提报为空)。关联 ado_s8_data_source.id</summary>
- [SugarColumn(ColumnName = "source_data_source_id", ColumnDataType = "bigint", IsNullable = true)]
- public long? SourceDataSourceId { get; set; }
- /// <summary>来源监视规则 ID(自动建单时填充)。关联 ado_s8_watch_rule.id</summary>
- [SugarColumn(ColumnName = "source_rule_id", ColumnDataType = "bigint", IsNullable = true)]
- public long? SourceRuleId { get; set; }
- /// <summary>命中规则时的原始数据快照(JSON 文本,便于追溯)</summary>
- [SugarColumn(ColumnName = "source_payload", Length = 4000, IsNullable = true)]
- public string? SourcePayload { get; set; }
- /// <summary>检验人ID(提交复检时手选)</summary>
- [SugarColumn(ColumnName = "verifier_id", ColumnDataType = "bigint", IsNullable = true)]
- public long? VerifierId { get; set; }
- /// <summary>提交复检时间</summary>
- [SugarColumn(ColumnName = "verification_assigned_at", IsNullable = true)]
- public DateTime? VerificationAssignedAt { get; set; }
- /// <summary>检验完成时间</summary>
- [SugarColumn(ColumnName = "verified_at", IsNullable = true)]
- public DateTime? VerifiedAt { get; set; }
- /// <summary>检验结果(APPROVED / REJECTED)</summary>
- [SugarColumn(ColumnName = "verification_result", Length = 32, IsNullable = true)]
- public string? VerificationResult { get; set; }
- /// <summary>检验意见</summary>
- [SugarColumn(ColumnName = "verification_remark", Length = 2000, IsNullable = true)]
- public string? VerificationRemark { get; set; }
- }
|