using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ZKLT.Hadoop.Model { /// /// 数据列 /// [AttributeUsage(AttributeTargets.Property, Inherited = true)] [HDP_Table(Key = "HDP_Column", Description = "列")] public class HDP_Column : Attribute { private string? _Id; private string? _TableId; private string? _Key; private bool _IsPrimary; private string? _Description; private string? _DataType; private int _Length; private int _DecimalLength; /// /// 编号 /// [HDP_Column(Key = "Id",Description = "编号", Length = 100, DataType = HDP_ColumnDataType.VARCHAR, IsPrimary = true)] public string? Id { get => _Id; set => _Id = value; } /// /// 表编号 /// [HDP_Column(Key = "TableId",Description = "表编号", Length = 100, DataType = HDP_ColumnDataType.VARCHAR)] public string? TableId { get => _TableId; set => _TableId = value; } /// /// 列名 /// [HDP_Column(Key = "Key", Description = "列名", Length = 100, DataType = HDP_ColumnDataType.VARCHAR)] public string? Key { get => _Key; set => _Key = value; } /// /// 是否主键 /// [HDP_Column(Key = "IsPrimary", Description = "是否主键", DataType = HDP_ColumnDataType.BOOL)] public bool IsPrimary { get => _IsPrimary; set => _IsPrimary = value; } /// /// 描述 /// [HDP_Column(Key = "Description", Description = "描述",Length = 200, DataType = HDP_ColumnDataType.VARCHAR)] public string? Description { get => _Description; set => _Description = value; } /// /// 数据类型 /// [HDP_Column(Key = "DataType", Description = "数据类型", Length = 100, DataType = HDP_ColumnDataType.VARCHAR)] public string? DataType { get => _DataType; set => _DataType = value; } /// /// 长度 /// [HDP_Column(Key = "Length", Description = "长度", DataType = HDP_ColumnDataType.INT)] public int Length { get => _Length; set => _Length = value; } /// /// 小数长度 /// [HDP_Column(Key = "DecimalLength", Description = "小数长度", DataType = HDP_ColumnDataType.INT)] public int DecimalLength { get => _DecimalLength; set => _DecimalLength = value; } } }