CeErpDesignInfo.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. using Castle.ActiveRecord;
  2. using NHibernate.Criterion;
  3. namespace BizCom
  4. {
  5. [ActiveRecord("Ce_ErpDesignInfo")]
  6. public class CeErpDesignInfo : ComBase<CeErpDesignInfo>
  7. {
  8. /// <summary>
  9. /// ID
  10. /// </summary>
  11. [PrimaryKey(PrimaryKeyType.Native)]
  12. public int ID { get; set; }
  13. /// <summary>
  14. /// 0组织1用户
  15. /// </summary>
  16. [Property]
  17. public int type
  18. {
  19. get { return _type; }
  20. set { _type = value; }
  21. }
  22. private int _type;
  23. /// <summary>
  24. /// 目标id
  25. /// </summary>
  26. [Property]
  27. public int tarId
  28. {
  29. get { return _tarId; }
  30. set { _tarId = value; }
  31. }
  32. private int _tarId;
  33. /// <summary>
  34. /// 店铺id
  35. /// </summary>
  36. [Property]
  37. public int shopId
  38. {
  39. get { return _shopId; }
  40. set { _shopId = value; }
  41. }
  42. private int _shopId;
  43. /// <summary>
  44. /// 技能id,没有技能id则是店铺排序
  45. /// </summary>
  46. [Property]
  47. public int designId
  48. {
  49. get { return _designId; }
  50. set { _designId = value; }
  51. }
  52. private int _designId;
  53. /// <summary>
  54. /// 排序
  55. /// </summary>
  56. [Property]
  57. public int orders
  58. {
  59. get { return _orders; }
  60. set { _orders = value; }
  61. }
  62. private int _orders;
  63. public static CeErpDesignInfo GetByShopDesign(int tarId, int shopId, int designId)
  64. {
  65. return FindFirst(Expression.Sql(string.Format("(type = 1 and tarId = {0} and shopId={1} and designId={2})", tarId, shopId, designId)));
  66. }
  67. }
  68. }