MdpSource.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. namespace Admin.NET.Plugin.AiDOP.Entity.DataPlatform;
  2. /// <summary>
  3. /// MDP 外部数据源配置(DB 段 + API 段)。
  4. /// </summary>
  5. [SugarTable("mdp_source", "MDP外部数据源配置")]
  6. public class MdpSource
  7. {
  8. [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
  9. public long Id { get; set; }
  10. [SugarColumn(ColumnName = "tenant_id")]
  11. public long TenantId { get; set; }
  12. [SugarColumn(ColumnName = "source_code", Length = 100)]
  13. public string SourceCode { get; set; } = string.Empty;
  14. [SugarColumn(ColumnName = "source_name", Length = 200)]
  15. public string SourceName { get; set; } = string.Empty;
  16. /// <summary>DB / API</summary>
  17. [SugarColumn(ColumnName = "source_type", Length = 40)]
  18. public string SourceType { get; set; } = "DB";
  19. [SugarColumn(ColumnName = "status")]
  20. public int Status { get; set; } = 1;
  21. [SugarColumn(ColumnName = "db_type", Length = 40, IsNullable = true)]
  22. public string? DbType { get; set; }
  23. [SugarColumn(ColumnName = "db_host", Length = 200, IsNullable = true)]
  24. public string? DbHost { get; set; }
  25. [SugarColumn(ColumnName = "db_port", IsNullable = true)]
  26. public int? DbPort { get; set; }
  27. [SugarColumn(ColumnName = "db_name", Length = 200, IsNullable = true)]
  28. public string? DbName { get; set; }
  29. [SugarColumn(ColumnName = "db_user", Length = 200, IsNullable = true)]
  30. public string? DbUser { get; set; }
  31. [SugarColumn(ColumnName = "db_password_enc", Length = 500, IsNullable = true)]
  32. public string? DbPasswordEnc { get; set; }
  33. [SugarColumn(ColumnName = "db_extra_params", Length = 500, IsNullable = true)]
  34. public string? DbExtraParams { get; set; }
  35. [SugarColumn(ColumnName = "api_base_url", Length = 500, IsNullable = true)]
  36. public string? ApiBaseUrl { get; set; }
  37. [SugarColumn(ColumnName = "api_auth_type", Length = 40, IsNullable = true)]
  38. public string? ApiAuthType { get; set; }
  39. [SugarColumn(ColumnName = "api_auth_config", ColumnDataType = "json", IsNullable = true)]
  40. public string? ApiAuthConfig { get; set; }
  41. [SugarColumn(ColumnName = "last_health_check", IsNullable = true)]
  42. public DateTime? LastHealthCheck { get; set; }
  43. [SugarColumn(ColumnName = "health_status", IsNullable = true)]
  44. public int? HealthStatus { get; set; }
  45. [SugarColumn(ColumnName = "health_msg", Length = 500, IsNullable = true)]
  46. public string? HealthMsg { get; set; }
  47. [SugarColumn(ColumnName = "remark", Length = 500, IsNullable = true)]
  48. public string? Remark { get; set; }
  49. [SugarColumn(ColumnName = "create_time")]
  50. public DateTime CreateTime { get; set; }
  51. [SugarColumn(ColumnName = "update_time")]
  52. public DateTime UpdateTime { get; set; }
  53. }