User.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace LYFZ.WanYuKeFuData.Model
  6. {
  7. [Serializable]
  8. public class User
  9. {
  10. public User()
  11. {
  12. }
  13. long _ID = 0;
  14. string _UserID = "";
  15. string _UserName = "";
  16. int _Sex = 1;
  17. string _Password = "";
  18. string _QuanXianPeiZhi = "";
  19. long _CreateTime = 0;
  20. /// <summary>
  21. /// ID
  22. /// </summary>
  23. // [Newtonsoft.Json.JsonIgnore]
  24. public long ID
  25. {
  26. get { return _ID; }
  27. set { _ID = value; }
  28. }
  29. /// <summary>
  30. /// 用户ID 用户于登录的帐号
  31. /// </summary>
  32. public string UserID
  33. {
  34. get { return _UserID; }
  35. set { _UserID = value; }
  36. }
  37. /// <summary>
  38. /// 用户名 呢称
  39. /// </summary>
  40. public string UserName
  41. {
  42. get { return _UserName; }
  43. set { _UserName = value; }
  44. }
  45. /// <summary>
  46. /// 性别 0 为女 1 为男
  47. /// </summary>
  48. public int Sex
  49. {
  50. get { return _Sex; }
  51. set { _Sex = value; }
  52. }
  53. /// <summary>
  54. /// 密码
  55. /// </summary>
  56. public string Password
  57. {
  58. get { return _Password; }
  59. set { _Password = value; }
  60. }
  61. /// <summary>
  62. /// 权限
  63. /// </summary>
  64. public string QuanXianPeiZhi
  65. {
  66. get { return _QuanXianPeiZhi; }
  67. set { _QuanXianPeiZhi = value; }
  68. }
  69. /// <summary>
  70. /// 创建时间
  71. /// </summary>
  72. public long CreateTime
  73. {
  74. get { return _CreateTime; }
  75. set { _CreateTime = value; }
  76. }
  77. /// <summary>
  78. /// 是否为管理员
  79. /// </summary>
  80. /// <returns></returns>
  81. public bool IsAdmin()
  82. {
  83. if (this.QuanXianPeiZhi.Trim() == "0")
  84. {
  85. return true;
  86. }
  87. else {
  88. return false;
  89. }
  90. }
  91. }
  92. }