CeErpSampleCustomer.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. using Castle.ActiveRecord;
  2. using System;
  3. using NHibernate.Criterion;
  4. namespace BizCom
  5. {
  6. [ActiveRecord("CE_ErpSampleCustomer")]
  7. public class CeErpSampleCustomer : ComBase<CeErpSampleCustomer>
  8. {
  9. /// <summary>
  10. ///
  11. /// </summary>
  12. [PrimaryKey(PrimaryKeyType.Native)]
  13. public int ID { get; set; }
  14. private string _buyer_nick = "";
  15. /// <summary>
  16. ///买家昵称
  17. /// </summary>
  18. [Property]
  19. public string buyer_nick
  20. {
  21. get { return _buyer_nick; }
  22. set { _buyer_nick = value; }
  23. }
  24. private string _userId = "";
  25. /// <summary>
  26. ///买家ID
  27. /// </summary>
  28. [Property]
  29. public string userId
  30. {
  31. get { return _userId; }
  32. set { _userId = value; }
  33. }
  34. private string _phone = "";
  35. /// <summary>
  36. ///电话
  37. /// </summary>
  38. [Property]
  39. public string phone
  40. {
  41. get { return _phone; }
  42. set { _phone = value; }
  43. }
  44. private string _address = "";
  45. /// <summary>
  46. ///地址
  47. /// </summary>
  48. [Property]
  49. public string address
  50. {
  51. get { return _address; }
  52. set { _address = value; }
  53. }
  54. /// <summary>
  55. ///最后购买时间
  56. /// </summary>
  57. [Property]
  58. public DateTime? lastbuy_time { get; set; }
  59. private string _seller_nick = "";
  60. /// <summary>
  61. ///
  62. /// </summary>
  63. [Property]
  64. public string seller_nick
  65. {
  66. get { return _seller_nick; }
  67. set { _seller_nick = value; }
  68. }
  69. private string _lastTid = "";
  70. /// <summary>
  71. ///上次购买订单号
  72. /// </summary>
  73. [Property]
  74. public string lastTid
  75. {
  76. get { return _lastTid; }
  77. set { _lastTid = value; }
  78. }
  79. private int _shopId = 0;
  80. /// <summary>
  81. /// 店铺id
  82. /// </summary>
  83. [Property]
  84. public int shopId
  85. {
  86. get { return _shopId; }
  87. set { _shopId = value; }
  88. }
  89. public static CeErpSampleCustomer GetByNick(string nick)
  90. {
  91. return FindFirst(Expression.Eq("buyer_nick", nick));
  92. }
  93. }
  94. }