-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEntity.cs
More file actions
executable file
·45 lines (38 loc) · 1.22 KB
/
Entity.cs
File metadata and controls
executable file
·45 lines (38 loc) · 1.22 KB
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
using System.Collections.Generic;
using System.Linq;
using ZNS.CodeGenerator.Utils;
namespace ZSN.CodeGenerator
{
public class Entity
{
}
public class ServerInfo
{
public ServerInfo()
{
ServerIp = ConfigHelper.GetString("DefaultServerIP");
ServerUser = ConfigHelper.GetString("DefaultServerUser");
ServerPwd = ConfigHelper.GetString("DefaultServerPWD");
ServerType = ConfigHelper.GetString("DefaultServerType");
}
public string ServerIp { get; set; }
public string ServerUser { get; set; }
public string ServerPwd { get; set; }
public string ServerDbName { get; set; }
public string ServerType { get; set; }
public bool IsSqlServer => ServerType.ToLower() == "sqlserver";
public bool IsMySql => ServerType.ToLower() == "mysql";
}
public class ServerType
{
public static object[] ServerTypeList = {
"SqlServer",
"MySql",
};
}
public class DBServer
{
private static readonly List<ServerInfo> ServerList = new List<ServerInfo> { new ServerInfo() };
public static ServerInfo Current => ServerList.Last();
}
}