wangzhibo
2026-05-09 53418655c061ac26f66058253f39200aced1ab1d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
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; }
 
    /// <summary>
    /// 可选:允许访问 Board 的 AD 组 DN(例如:CN=BoardUsers,OU=Groups,DC=example,DC=com)。
    /// 若未配置,则不做组校验(与旧配置兼容)。
    /// </summary>
    public string? AllowedGroupDN { get; set; }
 
    /// <summary>
    /// 可选:允许的多个 AD 组 DN(任意命中即通过)。
    /// </summary>
    public List<string>? 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<PageDef> 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<ScenarioPageRef> Pages { get; set; } = new();
}
 
public sealed class SystemScenarioCategory
{
    public string Id { get; set; } = "";
    public string Name { get; set; } = "";
    public List<SystemScenario> Scenarios { get; set; } = new();
}
 
public sealed class SystemScenariosConfig
{
    public List<SystemScenarioCategory> 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<ScenarioPageRef> Pages { get; set; } = new();
    public long CreatedAtMs { get; set; }
}
 
public sealed class UserScenariosUser
{
    public List<UserScenario> Scenarios { get; set; } = new();
}
 
public sealed class UserScenariosConfig
{
    public Dictionary<string, UserScenariosUser> 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<DataSrcEntry> 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; }
}