blob: 282ef791b6c7b6f58c5b46176e5cb37a5ed7a8f4 [file] [log] [blame]
Krishyab0cc1882025-06-09 10:54:09 +08001package com.example.myproject.entity;
223011385e9c35a2025-06-04 15:52:45 +08002
Krishyab0cc1882025-06-09 10:54:09 +08003import javax.persistence.*;
4import java.util.Date;
223011385e9c35a2025-06-04 15:52:45 +08005
Krishyab0cc1882025-06-09 10:54:09 +08006@Entity
7@Table(name = "user")
8public class Users {
223011385e9c35a2025-06-04 15:52:45 +08009
Krishyab0cc1882025-06-09 10:54:09 +080010 @Id
11 @GeneratedValue(strategy = GenerationType.IDENTITY)
12 @Column(name = "user_id")
13 private Long userId;
223011385e9c35a2025-06-04 15:52:45 +080014
Krishyab0cc1882025-06-09 10:54:09 +080015 @Column(name = "username", nullable = false,unique = true)
16 private String username;
223011385e9c35a2025-06-04 15:52:45 +080017
Krishyab0cc1882025-06-09 10:54:09 +080018 @Column(name = "avatar_url", nullable = true)
19 private String avatarUrl;
223011385e9c35a2025-06-04 15:52:45 +080020
Krishyab0cc1882025-06-09 10:54:09 +080021 @Column(name = "email", nullable = false)
22 private String email;
223011385e9c35a2025-06-04 15:52:45 +080023
Krishyab0cc1882025-06-09 10:54:09 +080024 @Column(name = "password", nullable = false)
25 private String password;
223011385e9c35a2025-06-04 15:52:45 +080026
Krishyab0cc1882025-06-09 10:54:09 +080027 @Column(name = "role", nullable = false)
28 private String role;
223011385e9c35a2025-06-04 15:52:45 +080029
Krishyab0cc1882025-06-09 10:54:09 +080030 @Column(name = "invite_count")
31 private Integer inviteCount;
223011385e9c35a2025-06-04 15:52:45 +080032
Krishyab0cc1882025-06-09 10:54:09 +080033 @Column(name = "level", nullable = false)
34 private Long level;
223011385e9c35a2025-06-04 15:52:45 +080035
Krishyab0cc1882025-06-09 10:54:09 +080036 @Column(name = "upload_count")
37 private Float uploadCount;
223011385e9c35a2025-06-04 15:52:45 +080038
Krishyab0cc1882025-06-09 10:54:09 +080039 @Column(name = "download_count")
40 private Float downloadCount;
223011385e9c35a2025-06-04 15:52:45 +080041
Krishyab0cc1882025-06-09 10:54:09 +080042 @Column(name = "share_rate")
43 private Float shareRate;
223011385e9c35a2025-06-04 15:52:45 +080044
Krishyab0cc1882025-06-09 10:54:09 +080045 @Column(name = "registration_date", nullable = false)
46 private Date registrationDate;
223011385e9c35a2025-06-04 15:52:45 +080047
Krishyab0cc1882025-06-09 10:54:09 +080048 @Column(name = "last_login_time")
49 private Date lastLoginTime;
223011385e9c35a2025-06-04 15:52:45 +080050
Krishyab0cc1882025-06-09 10:54:09 +080051 @Column(name = "user_points")
52 private Integer userPoints;
223011385e9c35a2025-06-04 15:52:45 +080053
Krishyab0cc1882025-06-09 10:54:09 +080054 @Column(name = "is_promo")
55 private Boolean isPromo;
223011385e9c35a2025-06-04 15:52:45 +080056
Krishyab0cc1882025-06-09 10:54:09 +080057 @Column(name = "current_experience", nullable = false)
58 private Integer currentExperience; // 当前经验值
223011385e9c35a2025-06-04 15:52:45 +080059
Krishyab0cc1882025-06-09 10:54:09 +080060 @Column(name = "current_seeding_hours", nullable = false)
61 private Float currentSeedingHours; // 当前做种时长
223011385e9c35a2025-06-04 15:52:45 +080062
Krishyab0cc1882025-06-09 10:54:09 +080063 @Column(name = "gender", nullable = true)
64 private String gender; // 性别
223011385e9c35a2025-06-04 15:52:45 +080065
Krishyab0cc1882025-06-09 10:54:09 +080066 @Column(name = "description", nullable = true)
67 private String description; // 个人描述
223011385e9c35a2025-06-04 15:52:45 +080068
Krishyab0cc1882025-06-09 10:54:09 +080069 @Column(name = "hobbies", nullable = true)
70 private String hobbies;
223011385e9c35a2025-06-04 15:52:45 +080071
Krishyab0cc1882025-06-09 10:54:09 +080072 @Column(name = "registration_time", nullable = false, updatable = false)
73 @Temporal(TemporalType.TIMESTAMP)
74 private Date registrationTime;
223011385e9c35a2025-06-04 15:52:45 +080075
Krishyab0cc1882025-06-09 10:54:09 +080076 // 新增的lastupdatetime字段
77 @Column(name = "lastupdatetime")
78 private Date lastupdatetime;
223011385e9c35a2025-06-04 15:52:45 +080079
Krishyab0cc1882025-06-09 10:54:09 +080080 // Getters and Setters
81 public Long getUserId() {
82 return userId;
83 }
223011385e9c35a2025-06-04 15:52:45 +080084
Krishyab0cc1882025-06-09 10:54:09 +080085 public void setUserId(Long userId) {
86 this.userId = userId;
87 }
223011385e9c35a2025-06-04 15:52:45 +080088
Krishyab0cc1882025-06-09 10:54:09 +080089 public String getUsername() {
90 return username;
91 }
223011385e9c35a2025-06-04 15:52:45 +080092
Krishyab0cc1882025-06-09 10:54:09 +080093 public void setUsername(String username) {
94 this.username = username;
95 }
223011385e9c35a2025-06-04 15:52:45 +080096
Krishyab0cc1882025-06-09 10:54:09 +080097 public String getAvatarUrl() {
98 return avatarUrl;
99 }
223011385e9c35a2025-06-04 15:52:45 +0800100
Krishyab0cc1882025-06-09 10:54:09 +0800101 public void setAvatarUrl(String avatarUrl) {
102 this.avatarUrl = avatarUrl;
103 }
223011385e9c35a2025-06-04 15:52:45 +0800104
Krishyab0cc1882025-06-09 10:54:09 +0800105 public String getEmail() {
106 return email;
107 }
223011385e9c35a2025-06-04 15:52:45 +0800108
Krishyab0cc1882025-06-09 10:54:09 +0800109 public void setEmail(String email) {
110 this.email = email;
111 }
223011385e9c35a2025-06-04 15:52:45 +0800112
Krishyab0cc1882025-06-09 10:54:09 +0800113 public String getPassword() {
114 return password;
115 }
223011385e9c35a2025-06-04 15:52:45 +0800116
Krishyab0cc1882025-06-09 10:54:09 +0800117 public void setPassword(String password) {
118 this.password = password;
119 }
223011385e9c35a2025-06-04 15:52:45 +0800120
Krishyab0cc1882025-06-09 10:54:09 +0800121 public String getRole() {
122 return role;
123 }
223011385e9c35a2025-06-04 15:52:45 +0800124
Krishyab0cc1882025-06-09 10:54:09 +0800125 public void setRole(String role) {
126 this.role = role;
127 }
223011385e9c35a2025-06-04 15:52:45 +0800128
Krishyab0cc1882025-06-09 10:54:09 +0800129 public Integer getInviteCount() {
130 return inviteCount;
131 }
132
133 public void setInviteCount(Integer inviteCount) {
134 this.inviteCount = inviteCount;
135 }
223011385e9c35a2025-06-04 15:52:45 +0800136
Krishyab0cc1882025-06-09 10:54:09 +0800137 public Long getLevel() {
138 return level;
139 }
223011385e9c35a2025-06-04 15:52:45 +0800140
Krishyab0cc1882025-06-09 10:54:09 +0800141 public void setLevel(Long level) {
142 this.level = level;
143 }
223011385e9c35a2025-06-04 15:52:45 +0800144
Krishyab0cc1882025-06-09 10:54:09 +0800145 public Float getUploadCount() {
146 return uploadCount;
147 }
223011385e9c35a2025-06-04 15:52:45 +0800148
Krishyab0cc1882025-06-09 10:54:09 +0800149 public void setUploadCount(Float uploadCount) {
150 this.uploadCount = uploadCount;
151 }
223011385e9c35a2025-06-04 15:52:45 +0800152
Krishyab0cc1882025-06-09 10:54:09 +0800153 public Float getDownloadCount() {
154 return downloadCount;
155 }
223011385e9c35a2025-06-04 15:52:45 +0800156
Krishyab0cc1882025-06-09 10:54:09 +0800157 public void setDownloadCount(Float downloadCount) {
158 this.downloadCount = downloadCount;
159 }
223011385e9c35a2025-06-04 15:52:45 +0800160
Krishyab0cc1882025-06-09 10:54:09 +0800161 public Float getShareRate() {
162 return shareRate;
163 }
223011385e9c35a2025-06-04 15:52:45 +0800164
Krishyab0cc1882025-06-09 10:54:09 +0800165 public void setShareRate(Float shareRate) {
166 this.shareRate = shareRate;
167 }
223011385e9c35a2025-06-04 15:52:45 +0800168
Krishyab0cc1882025-06-09 10:54:09 +0800169 public Date getRegistrationDate() {
170 return registrationDate;
171 }
223011385e9c35a2025-06-04 15:52:45 +0800172
Krishyab0cc1882025-06-09 10:54:09 +0800173 public void setRegistrationDate(Date registrationDate) {
174 this.registrationDate = registrationDate;
175 }
223011385e9c35a2025-06-04 15:52:45 +0800176
Krishyab0cc1882025-06-09 10:54:09 +0800177 public Date getLastLoginTime() {
178 return lastLoginTime;
179 }
223011385e9c35a2025-06-04 15:52:45 +0800180
Krishyab0cc1882025-06-09 10:54:09 +0800181 public void setLastLoginTime(Date lastLoginTime) {
182 this.lastLoginTime = lastLoginTime;
183 }
223011385e9c35a2025-06-04 15:52:45 +0800184
Krishyab0cc1882025-06-09 10:54:09 +0800185 public Integer getUserPoints() {
186 return userPoints;
187 }
223011385e9c35a2025-06-04 15:52:45 +0800188
Krishyab0cc1882025-06-09 10:54:09 +0800189 public void setUserPoints(Integer userPoints) {
190 this.userPoints = userPoints;
191 }
223011385e9c35a2025-06-04 15:52:45 +0800192
Krishyab0cc1882025-06-09 10:54:09 +0800193 public Boolean getIsPromo() {
194 return isPromo;
195 }
223011385e9c35a2025-06-04 15:52:45 +0800196
Krishyab0cc1882025-06-09 10:54:09 +0800197 public void setIsPromo(Boolean isPromo) {
198 this.isPromo = isPromo;
199 }
223011385e9c35a2025-06-04 15:52:45 +0800200
Krishyab0cc1882025-06-09 10:54:09 +0800201 public Integer getCurrentExperience() {
202 return currentExperience;
203 }
223011385e9c35a2025-06-04 15:52:45 +0800204
Krishyab0cc1882025-06-09 10:54:09 +0800205 public void setCurrentExperience(Integer currentExperience) {
206 this.currentExperience = currentExperience;
207 }
223011385e9c35a2025-06-04 15:52:45 +0800208
Krishyab0cc1882025-06-09 10:54:09 +0800209 public Float getCurrentSeedingHours() {
210 return currentSeedingHours;
211 }
223011385e9c35a2025-06-04 15:52:45 +0800212
Krishyab0cc1882025-06-09 10:54:09 +0800213 public void setCurrentSeedingHours(Float currentSeedingHours) {
214 this.currentSeedingHours = currentSeedingHours;
215 }
223011385e9c35a2025-06-04 15:52:45 +0800216
Krishyab0cc1882025-06-09 10:54:09 +0800217 public String getGender() {
218 return gender;
219 }
223011385e9c35a2025-06-04 15:52:45 +0800220
Krishyab0cc1882025-06-09 10:54:09 +0800221 public void setGender(String gender) {
222 this.gender = gender;
223 }
223011385e9c35a2025-06-04 15:52:45 +0800224
Krishyab0cc1882025-06-09 10:54:09 +0800225 public String getDescription() {
226 return description;
227 }
223011385e9c35a2025-06-04 15:52:45 +0800228
Krishyab0cc1882025-06-09 10:54:09 +0800229 public void setDescription(String description) {
230 this.description = description;
231 }
223011385e9c35a2025-06-04 15:52:45 +0800232
Krishyab0cc1882025-06-09 10:54:09 +0800233 public String getHobbies() {
234 return hobbies;
235 }
223011385e9c35a2025-06-04 15:52:45 +0800236
Krishyab0cc1882025-06-09 10:54:09 +0800237 public void setHobbies(String hobbies) {
238 this.hobbies = hobbies;
239 }
223011385e9c35a2025-06-04 15:52:45 +0800240
Krishyab0cc1882025-06-09 10:54:09 +0800241 public Date getRegistrationTime() {
242 return registrationTime;
243 }
223011385e9c35a2025-06-04 15:52:45 +0800244
Krishyab0cc1882025-06-09 10:54:09 +0800245 public void setRegistrationTime(Date registrationTime) {
246 this.registrationTime = registrationTime;
247 }
223011385e9c35a2025-06-04 15:52:45 +0800248
Krishyab0cc1882025-06-09 10:54:09 +0800249 // 新增的lastupdatetime的getter和setter方法
250 public Date getLastupdatetime() {
251 return lastupdatetime;
252 }
223011385e9c35a2025-06-04 15:52:45 +0800253
Krishyab0cc1882025-06-09 10:54:09 +0800254 public void setLastupdatetime(Date lastupdatetime) {
255 this.lastupdatetime = lastupdatetime;
256 }
257}