using Castle.ActiveRecord; using NHibernate.Criterion; namespace BizCom { [ActiveRecord("Ce_ErpDesignInfo")] public class CeErpDesignInfo : ComBase { /// /// ID /// [PrimaryKey(PrimaryKeyType.Native)] public int ID { get; set; } /// /// 0组织1用户 /// [Property] public int type { get { return _type; } set { _type = value; } } private int _type; /// /// 目标id /// [Property] public int tarId { get { return _tarId; } set { _tarId = value; } } private int _tarId; /// /// 店铺id /// [Property] public int shopId { get { return _shopId; } set { _shopId = value; } } private int _shopId; /// /// 技能id,没有技能id则是店铺排序 /// [Property] public int designId { get { return _designId; } set { _designId = value; } } private int _designId; /// /// 排序 /// [Property] public int orders { get { return _orders; } set { _orders = value; } } private int _orders; public static CeErpDesignInfo GetByShopDesign(int tarId, int shopId, int designId) { return FindFirst(Expression.Sql(string.Format("(type = 1 and tarId = {0} and shopId={1} and designId={2})", tarId, shopId, designId))); } } }