using Castle.ActiveRecord; using System; using NHibernate.Criterion; namespace BizCom { [ActiveRecord("CE_ErpDeliverMark")] public class CeErpDeliverMark : ComBase { /// /// ID /// [PrimaryKey(PrimaryKeyType.Native)] public int ID { get; set; } private string _ctid; /// /// ctid /// [Property] public string ctid { get { return _ctid; } set { _ctid = value; } } private string _nickName; /// /// 昵称 /// [Property] public string nickName { get { return _nickName; } set { _nickName = value; } } /// /// 创建时间 /// [Property] public DateTime? createtime { get; set; } private bool _isDel = false; /// /// 是否删除 /// [Property] public bool isdel { get { return _isDel; } set { _isDel = value; } } private int _markNumber = 0; /// /// 编码 /// [Property] public int markNumber { get { return _markNumber; } set { _markNumber = value; } } public static CeErpDeliverMark GetByCtid(string ctid) { return FindFirst(Expression.Sql(string.Format("ctid='{0}' and isDel = 0", ctid))); } public static CeErpDeliverMark GetByNumber(int markNumber) { return FindFirst(Expression.Sql(string.Format("markNumber='{0}' and isDel = 0", markNumber))); } } }