User.java 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. package com.goafanti.common.model;
  2. import java.util.Date;
  3. import javax.validation.constraints.Pattern;
  4. import javax.validation.constraints.Size;
  5. import com.fasterxml.jackson.annotation.JsonIgnore;
  6. import com.goafanti.common.constant.ErrorConstants;
  7. public class User extends BaseModel implements AftUser{
  8. /**
  9. *
  10. */
  11. private static final long serialVersionUID = 1L;
  12. private String id;
  13. /**
  14. * 用户注册手机号,作为登录依据
  15. */
  16. @Size(min = 0, max = 11, message = "{" + ErrorConstants.MOBILE_SIZE_ERROR + "}")
  17. @Pattern(regexp = "^[0-9]*[1-9][0-9]*$", message = "{"
  18. + ErrorConstants.MOBILE_PATTERN_ERROR + "}")
  19. private String mobile;
  20. /**
  21. * 密码,md5+salt
  22. */
  23. private String password;
  24. /**
  25. * 用户昵称
  26. */
  27. private String nickname;
  28. /**
  29. * 用户邮箱
  30. */
  31. private String email;
  32. /**
  33. * 注册时间
  34. */
  35. private Date createTime;
  36. /**
  37. * 用户编号
  38. */
  39. private Long number;
  40. /**
  41. * 用户等级
  42. */
  43. private Integer lvl;
  44. /**
  45. * 个人账号还是组织账号
  46. 默认0为个人账号,1为组织账号
  47. */
  48. private Integer type;
  49. /**
  50. * 管理员ID
  51. */
  52. private String aid;
  53. public String getId() {
  54. return id;
  55. }
  56. public void setId(String id) {
  57. this.id = id;
  58. }
  59. public String getMobile() {
  60. return mobile;
  61. }
  62. public void setMobile(String mobile) {
  63. this.mobile = mobile;
  64. }
  65. @JsonIgnore
  66. public String getPassword() {
  67. return password;
  68. }
  69. public void setPassword(String password) {
  70. this.password = password;
  71. }
  72. public String getNickname() {
  73. return nickname;
  74. }
  75. public void setNickname(String nickname) {
  76. this.nickname = nickname;
  77. }
  78. public String getEmail() {
  79. return email;
  80. }
  81. public void setEmail(String email) {
  82. this.email = email;
  83. }
  84. public Date getCreateTime() {
  85. return createTime;
  86. }
  87. public void setCreateTime(Date createTime) {
  88. this.createTime = createTime;
  89. }
  90. public Long getNumber() {
  91. return number;
  92. }
  93. public void setNumber(Long number) {
  94. this.number = number;
  95. }
  96. public Integer getType() {
  97. return type;
  98. }
  99. public void setType(Integer type) {
  100. this.type = type;
  101. }
  102. public Integer getLvl() {
  103. return lvl;
  104. }
  105. public void setLvl(Integer lvl) {
  106. this.lvl = lvl;
  107. }
  108. @Override
  109. public String getAid() {
  110. return aid;
  111. }
  112. public void setAid(String aid) {
  113. this.aid = aid;
  114. }
  115. }