|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Data.Common;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace ZKLT.Hadoop.Model
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 源
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HDP_Table(Key = "HDP_Source",Description = "源")]
|
|
|
|
|
public class HDP_Source
|
|
|
|
|
{
|
|
|
|
|
private string? _Id;
|
|
|
|
|
|
|
|
|
|
private string? _Key;
|
|
|
|
|
|
|
|
|
|
private string? _Host;
|
|
|
|
|
|
|
|
|
|
private int? _Port;
|
|
|
|
|
|
|
|
|
|
private string? _Account;
|
|
|
|
|
|
|
|
|
|
private string? _PassWord;
|
|
|
|
|
|
|
|
|
|
private string? _Description;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 编号
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HDP_Column(Key = "Id", Description = "编号", Length = 100, DataType = HDP_ColumnDataType.VARCHAR, IsPrimary = true)]
|
|
|
|
|
public string? Id { get => _Id; set => _Id = value; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 键
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HDP_Column(Key = "Key", Description = "键", Length = 100, DataType = HDP_ColumnDataType.VARCHAR)]
|
|
|
|
|
public string? Key { get => _Key; set => _Key = value; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 主机
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HDP_Column(Key = "Host", Description = "主机", Length = 200, DataType = HDP_ColumnDataType.VARCHAR)]
|
|
|
|
|
public string? Host { get => _Host; set => _Host = value; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 端口
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HDP_Column(Key = "Port", Description = "端口", DataType = HDP_ColumnDataType.INT)]
|
|
|
|
|
public int? Port { get => _Port; set => _Port = value; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 用户名
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HDP_Column(Key = "Account", Description = "用户名",Length = 100, DataType = HDP_ColumnDataType.VARCHAR)]
|
|
|
|
|
public string? Account { get => _Account; set => _Account = value; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 密码
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HDP_Column(Key = "PassWord", Description = "密码", Length = 100, DataType = HDP_ColumnDataType.VARCHAR)]
|
|
|
|
|
public string? PassWord { get => _PassWord; set => _PassWord = value; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 描述
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HDP_Column(Key = "Description", Description = "描述", Length = 200, DataType = HDP_ColumnDataType.VARCHAR)]
|
|
|
|
|
public string? Description { get => _Description; set => _Description = value; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取连接字符串
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>连接字符串</returns>
|
|
|
|
|
public string GetConnectString() {
|
|
|
|
|
return @$"Data Source={Host};Port={Port};Database={Key};User Id={Account};
|
|
|
|
|
Pwd={PassWord};Charset=utf8;Pooling=true;";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|