namespace HotelPms.Share.Data;
|
|
/// <summary>
|
/// テーブルFacilityMstに対応するクラスです。
|
/// </summary>
|
[Serializable()]
|
public class DBConnectItem
|
{
|
private string hostName = string.Empty;
|
public string HostName
|
{
|
get { return hostName; }
|
set { hostName = value; }
|
}
|
private string dBName = string.Empty;
|
|
public string DBName
|
{
|
get { return dBName; }
|
set { dBName = value; }
|
}
|
private string userID = string.Empty;
|
|
public string UserID
|
{
|
get { return userID; }
|
set { userID = value; }
|
}
|
private string password = string.Empty;
|
|
public string Password
|
{
|
get { return password; }
|
set { password = value; }
|
}
|
|
/// <summary>
|
/// ※SqlServerでは使わない 1433となる
|
/// </summary>
|
public int Port { get; set; } = 5432;
|
|
private object tag = null;
|
|
public object Tag
|
{
|
get { return tag; }
|
set { tag = value; }
|
}
|
|
public DBConnectItem()
|
{
|
}
|
|
public DBConnectItem(string hostName, string dBName, string userID, string password)
|
: this(hostName, dBName, userID, password, 5432)
|
{ }
|
|
public DBConnectItem(string hostName, string dBName, string userID, string password, int port)
|
: this(hostName, dBName, userID, password, port, null)
|
{ }
|
|
public DBConnectItem(string hostName, string dBName, string userID, string password, int port, object tag)
|
{
|
this.hostName = hostName;
|
this.dBName = dBName;
|
this.userID = userID;
|
this.password = password;
|
Port = port;
|
this.tag = tag;
|
}
|
|
public virtual DBConnectItem Clone()
|
{
|
return new DBConnectItem()
|
{
|
HostName = this.hostName,
|
DBName = this.dBName,
|
UserID = this.userID,
|
Password = this.password,
|
Tag = this.tag
|
};
|
}
|
}
|