using System; namespace Zhaizj.Framework.ORM { /// /// 数据列批注,用于标识属性在数据库中对应的列名称和长度 /// [Serializable, AttributeUsage( AttributeTargets.Property )] public class ColumnAttribute : Attribute { private String _columnName; private String _label; private int _length; public ColumnAttribute() { _length = 250; } public String Name { get { return _columnName; } set { _columnName = value; } } public String Label { get { return _label; } set { _label = value; } } public int Length { get { return _length; } set { _length = value; } } public Boolean LengthSetted() { return _length > 0 && _length != 250; } } }