namespace BoardApp.Config;
public sealed class AppConfig
{
public int Port { get; set; }
public string SessionSecret { get; set; } = "";
public int SessionMaxAgeMs { get; set; }
public bool TrustProxy { get; set; }
public bool CookieSecure { get; set; }
public object? CookieSameSite { get; set; } = "lax";
public bool? SkipLdapAuthForDebug { get; set; }
public string DataEasePublicBase { get; set; } = "";
}
public sealed class LdapTlsOptions
{
public bool? RejectUnauthorized { get; set; }
}
public sealed class LdapConfig
{
public string Url { get; set; } = "";
public string BindDN { get; set; } = "";
public string BindPassword { get; set; } = "";
public string SearchBase { get; set; } = "";
public string SearchFilter { get; set; } = "";
public LdapTlsOptions? TlsOptions { get; set; }
///
/// 可选:允许访问 Board 的 AD 组 DN(例如:CN=BoardUsers,OU=Groups,DC=example,DC=com)。
/// 若未配置,则不做组校验(与旧配置兼容)。
///
public string? AllowedGroupDN { get; set; }
///
/// 可选:允许的多个 AD 组 DN(任意命中即通过)。
///
public List? AllowedGroupDNs { get; set; }
}
public sealed class PageDef
{
public string Id { get; set; } = "";
public string Title { get; set; } = "";
public string BoardUrl { get; set; } = "";
public string Image { get; set; } = "";
}
public sealed class PagesConfig
{
public List Pages { get; set; } = new();
}
public sealed class ScenarioPageRef
{
public string PageId { get; set; } = "";
public int Staytime { get; set; }
}
public sealed class SystemScenario
{
public string Id { get; set; } = "";
public string Name { get; set; } = "";
public string Image { get; set; } = "";
public List Pages { get; set; } = new();
}
public sealed class SystemScenarioCategory
{
public string Id { get; set; } = "";
public string Name { get; set; } = "";
public List Scenarios { get; set; } = new();
}
public sealed class SystemScenariosConfig
{
public List Categories { get; set; } = new();
}
public sealed class UserScenario
{
public string Id { get; set; } = "";
public string Name { get; set; } = "";
public string Image { get; set; } = "";
public List Pages { get; set; } = new();
public long CreatedAtMs { get; set; }
}
public sealed class UserScenariosUser
{
public List Scenarios { get; set; } = new();
}
public sealed class UserScenariosConfig
{
public Dictionary Users { get; set; } = new();
}
public sealed class SqlServerOptions
{
public bool? Encrypt { get; set; }
public bool? TrustServerCertificate { get; set; }
public bool? EnableArithAbort { get; set; }
}
public sealed class SqlServerConfig
{
public string User { get; set; } = "";
public string Password { get; set; } = "";
public string Server { get; set; } = "";
public int? Port { get; set; }
public string Database { get; set; } = "";
public SqlServerOptions? Options { get; set; }
}
public sealed class DataSrcEntry
{
public string Id { get; set; } = "";
public string Sql { get; set; } = "";
}
public sealed class DataSrcConfig
{
public List Sources { get; set; } = new();
}
public sealed class WarehousePlanEntry
{
public string Datestr { get; set; } = "";
public string Eventstr { get; set; } = "";
public string? Note_a { get; set; }
public string? Note_b { get; set; }
public string? Event_status { get; set; }
public string? Event_src { get; set; }
public string? Event_to { get; set; }
}