using System; namespace DBCHM.PdmModels { /// /// 表列信息 /// public class ColumnInfo { private TableInfo _OwnerTable; /// /// 所属表 /// public TableInfo OwnerTable { get { return _OwnerTable; } } public ColumnInfo(TableInfo OwnerTable) { this._OwnerTable = OwnerTable; } /// /// 是否主键 /// public bool IsPrimaryKey { get { PdmKey theKey = _OwnerTable.PrimaryKey; if (theKey != null) { if (theKey.ColumnObjCodes.Contains(columnId)) { return true; } } return false; } } string columnId; /// /// 列标识 /// public string ColumnId { get { return columnId; } set { columnId = value; } } string objectID; /// /// 对象Id,全局唯一. /// public string ObjectID { get { return objectID; } set { objectID = value; } } string name; /// /// 列名 /// public string Name { get { return name; } set { name = value; } } string code; /// /// 列代码,对应数据库表字段名 /// public string Code { get { return code; } set { code = value; } } DateTime creationDate; /// /// 创建日期 /// public DateTime CreationDate { get { return creationDate; } set { creationDate = value; } } string creator; /// /// 创建人 /// public string Creator { get { return creator; } set { creator = value; } } DateTime modificationDate; /// /// 修改日期 /// public DateTime ModificationDate { get { return modificationDate; } set { modificationDate = value; } } string modifier; /// /// 修改人 /// public string Modifier { get { return modifier; } set { modifier = value; } } string comment; /// /// 注视 /// public string Comment { get { return comment; } set { comment = value; } } string dataType; /// /// 数据类型 /// public string DataType { get { return dataType; } set { dataType = value; } } string length; /// /// 数据长度 /// public string Length { get { return length; } set { length = value; } } bool identity; /// /// 是否自增量 /// public bool Identity { get { return identity; } set { identity = value; } } bool mandatory; /// /// 是否可空 /// public bool Mandatory { get { return mandatory; } set { mandatory = value; } } string extendedAttributesText; /// /// 扩展属性 /// public string ExtendedAttributesText { get { return extendedAttributesText; } set { extendedAttributesText = value; } } /// /// 物理选项 /// public string PhysicalOptions { get; set; } /// /// 精度 /// public string Precision { get; set; } /// /// 描述 /// public string Description { get; set; } } }