namespace Admin.NET.Plugin.AiDOP.Entity.DataPlatform;
///
/// MDP 外部数据源配置(DB 段 + API 段)。
///
[SugarTable("mdp_source", "MDP外部数据源配置")]
public class MdpSource
{
[SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
public long Id { get; set; }
[SugarColumn(ColumnName = "tenant_id")]
public long TenantId { get; set; }
[SugarColumn(ColumnName = "source_code", Length = 100)]
public string SourceCode { get; set; } = string.Empty;
[SugarColumn(ColumnName = "source_name", Length = 200)]
public string SourceName { get; set; } = string.Empty;
/// DB / API
[SugarColumn(ColumnName = "source_type", Length = 40)]
public string SourceType { get; set; } = "DB";
[SugarColumn(ColumnName = "status")]
public int Status { get; set; } = 1;
[SugarColumn(ColumnName = "db_type", Length = 40, IsNullable = true)]
public string? DbType { get; set; }
[SugarColumn(ColumnName = "db_host", Length = 200, IsNullable = true)]
public string? DbHost { get; set; }
[SugarColumn(ColumnName = "db_port", IsNullable = true)]
public int? DbPort { get; set; }
[SugarColumn(ColumnName = "db_name", Length = 200, IsNullable = true)]
public string? DbName { get; set; }
[SugarColumn(ColumnName = "db_user", Length = 200, IsNullable = true)]
public string? DbUser { get; set; }
[SugarColumn(ColumnName = "db_password_enc", Length = 500, IsNullable = true)]
public string? DbPasswordEnc { get; set; }
[SugarColumn(ColumnName = "db_extra_params", Length = 500, IsNullable = true)]
public string? DbExtraParams { get; set; }
[SugarColumn(ColumnName = "api_base_url", Length = 500, IsNullable = true)]
public string? ApiBaseUrl { get; set; }
[SugarColumn(ColumnName = "api_auth_type", Length = 40, IsNullable = true)]
public string? ApiAuthType { get; set; }
[SugarColumn(ColumnName = "api_auth_config", ColumnDataType = "json", IsNullable = true)]
public string? ApiAuthConfig { get; set; }
[SugarColumn(ColumnName = "last_health_check", IsNullable = true)]
public DateTime? LastHealthCheck { get; set; }
[SugarColumn(ColumnName = "health_status", IsNullable = true)]
public int? HealthStatus { get; set; }
[SugarColumn(ColumnName = "health_msg", Length = 500, IsNullable = true)]
public string? HealthMsg { get; set; }
[SugarColumn(ColumnName = "remark", Length = 500, IsNullable = true)]
public string? Remark { get; set; }
[SugarColumn(ColumnName = "create_time")]
public DateTime CreateTime { get; set; }
[SugarColumn(ColumnName = "update_time")]
public DateTime UpdateTime { get; set; }
}