init lserp cs 5.0
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
namespace Zhaizj.Framework.ORM {
|
||||
|
||||
/// <summary>
|
||||
/// 数据列批注,用于标识属性在数据库中对应的列名称和长度
|
||||
/// </summary>
|
||||
[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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user