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