blob: a9398cf7783037f0c705e29bf3d01b36f40542c6 [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
Jin80d879a2025-06-09 20:53:18 +080080 @Column(name = "money", nullable = false)
81 private Integer money;
82
Krishyab0cc1882025-06-09 10:54:09 +080083 // Getters and Setters
Jin80d879a2025-06-09 20:53:18 +080084 public Integer getMoney() {
85 return money;
86 }
87 public void setMoney(Integer money) {
88 this.money = money;
89 }
90
Krishyab0cc1882025-06-09 10:54:09 +080091 public Long getUserId() {
92 return userId;
93 }
223011385e9c35a2025-06-04 15:52:45 +080094
Krishyab0cc1882025-06-09 10:54:09 +080095 public void setUserId(Long userId) {
96 this.userId = userId;
97 }
223011385e9c35a2025-06-04 15:52:45 +080098
Krishyab0cc1882025-06-09 10:54:09 +080099 public String getUsername() {
100 return username;
101 }
223011385e9c35a2025-06-04 15:52:45 +0800102
Krishyab0cc1882025-06-09 10:54:09 +0800103 public void setUsername(String username) {
104 this.username = username;
105 }
223011385e9c35a2025-06-04 15:52:45 +0800106
Krishyab0cc1882025-06-09 10:54:09 +0800107 public String getAvatarUrl() {
108 return avatarUrl;
109 }
223011385e9c35a2025-06-04 15:52:45 +0800110
Krishyab0cc1882025-06-09 10:54:09 +0800111 public void setAvatarUrl(String avatarUrl) {
112 this.avatarUrl = avatarUrl;
113 }
223011385e9c35a2025-06-04 15:52:45 +0800114
Krishyab0cc1882025-06-09 10:54:09 +0800115 public String getEmail() {
116 return email;
117 }
223011385e9c35a2025-06-04 15:52:45 +0800118
Krishyab0cc1882025-06-09 10:54:09 +0800119 public void setEmail(String email) {
120 this.email = email;
121 }
223011385e9c35a2025-06-04 15:52:45 +0800122
Krishyab0cc1882025-06-09 10:54:09 +0800123 public String getPassword() {
124 return password;
125 }
223011385e9c35a2025-06-04 15:52:45 +0800126
Krishyab0cc1882025-06-09 10:54:09 +0800127 public void setPassword(String password) {
128 this.password = password;
129 }
223011385e9c35a2025-06-04 15:52:45 +0800130
Krishyab0cc1882025-06-09 10:54:09 +0800131 public String getRole() {
132 return role;
133 }
223011385e9c35a2025-06-04 15:52:45 +0800134
Krishyab0cc1882025-06-09 10:54:09 +0800135 public void setRole(String role) {
136 this.role = role;
137 }
223011385e9c35a2025-06-04 15:52:45 +0800138
Krishyab0cc1882025-06-09 10:54:09 +0800139 public Integer getInviteCount() {
140 return inviteCount;
141 }
142
143 public void setInviteCount(Integer inviteCount) {
144 this.inviteCount = inviteCount;
145 }
223011385e9c35a2025-06-04 15:52:45 +0800146
Krishyab0cc1882025-06-09 10:54:09 +0800147 public Long getLevel() {
148 return level;
149 }
223011385e9c35a2025-06-04 15:52:45 +0800150
Krishyab0cc1882025-06-09 10:54:09 +0800151 public void setLevel(Long level) {
152 this.level = level;
153 }
223011385e9c35a2025-06-04 15:52:45 +0800154
Krishyab0cc1882025-06-09 10:54:09 +0800155 public Float getUploadCount() {
156 return uploadCount;
157 }
223011385e9c35a2025-06-04 15:52:45 +0800158
Krishyab0cc1882025-06-09 10:54:09 +0800159 public void setUploadCount(Float uploadCount) {
160 this.uploadCount = uploadCount;
161 }
223011385e9c35a2025-06-04 15:52:45 +0800162
Krishyab0cc1882025-06-09 10:54:09 +0800163 public Float getDownloadCount() {
164 return downloadCount;
165 }
223011385e9c35a2025-06-04 15:52:45 +0800166
Krishyab0cc1882025-06-09 10:54:09 +0800167 public void setDownloadCount(Float downloadCount) {
168 this.downloadCount = downloadCount;
169 }
223011385e9c35a2025-06-04 15:52:45 +0800170
Krishyab0cc1882025-06-09 10:54:09 +0800171 public Float getShareRate() {
172 return shareRate;
173 }
223011385e9c35a2025-06-04 15:52:45 +0800174
Krishyab0cc1882025-06-09 10:54:09 +0800175 public void setShareRate(Float shareRate) {
176 this.shareRate = shareRate;
177 }
223011385e9c35a2025-06-04 15:52:45 +0800178
Krishyab0cc1882025-06-09 10:54:09 +0800179 public Date getRegistrationDate() {
180 return registrationDate;
181 }
223011385e9c35a2025-06-04 15:52:45 +0800182
Krishyab0cc1882025-06-09 10:54:09 +0800183 public void setRegistrationDate(Date registrationDate) {
184 this.registrationDate = registrationDate;
185 }
223011385e9c35a2025-06-04 15:52:45 +0800186
Krishyab0cc1882025-06-09 10:54:09 +0800187 public Date getLastLoginTime() {
188 return lastLoginTime;
189 }
223011385e9c35a2025-06-04 15:52:45 +0800190
Krishyab0cc1882025-06-09 10:54:09 +0800191 public void setLastLoginTime(Date lastLoginTime) {
192 this.lastLoginTime = lastLoginTime;
193 }
223011385e9c35a2025-06-04 15:52:45 +0800194
Krishyab0cc1882025-06-09 10:54:09 +0800195 public Integer getUserPoints() {
196 return userPoints;
197 }
223011385e9c35a2025-06-04 15:52:45 +0800198
Krishyab0cc1882025-06-09 10:54:09 +0800199 public void setUserPoints(Integer userPoints) {
200 this.userPoints = userPoints;
201 }
223011385e9c35a2025-06-04 15:52:45 +0800202
Krishyab0cc1882025-06-09 10:54:09 +0800203 public Boolean getIsPromo() {
204 return isPromo;
205 }
223011385e9c35a2025-06-04 15:52:45 +0800206
Krishyab0cc1882025-06-09 10:54:09 +0800207 public void setIsPromo(Boolean isPromo) {
208 this.isPromo = isPromo;
209 }
223011385e9c35a2025-06-04 15:52:45 +0800210
Krishyab0cc1882025-06-09 10:54:09 +0800211 public Integer getCurrentExperience() {
212 return currentExperience;
213 }
223011385e9c35a2025-06-04 15:52:45 +0800214
Krishyab0cc1882025-06-09 10:54:09 +0800215 public void setCurrentExperience(Integer currentExperience) {
216 this.currentExperience = currentExperience;
217 }
223011385e9c35a2025-06-04 15:52:45 +0800218
Krishyab0cc1882025-06-09 10:54:09 +0800219 public Float getCurrentSeedingHours() {
220 return currentSeedingHours;
221 }
223011385e9c35a2025-06-04 15:52:45 +0800222
Krishyab0cc1882025-06-09 10:54:09 +0800223 public void setCurrentSeedingHours(Float currentSeedingHours) {
224 this.currentSeedingHours = currentSeedingHours;
225 }
223011385e9c35a2025-06-04 15:52:45 +0800226
Krishyab0cc1882025-06-09 10:54:09 +0800227 public String getGender() {
228 return gender;
229 }
223011385e9c35a2025-06-04 15:52:45 +0800230
Krishyab0cc1882025-06-09 10:54:09 +0800231 public void setGender(String gender) {
232 this.gender = gender;
233 }
223011385e9c35a2025-06-04 15:52:45 +0800234
Krishyab0cc1882025-06-09 10:54:09 +0800235 public String getDescription() {
236 return description;
237 }
223011385e9c35a2025-06-04 15:52:45 +0800238
Krishyab0cc1882025-06-09 10:54:09 +0800239 public void setDescription(String description) {
240 this.description = description;
241 }
223011385e9c35a2025-06-04 15:52:45 +0800242
Krishyab0cc1882025-06-09 10:54:09 +0800243 public String getHobbies() {
244 return hobbies;
245 }
223011385e9c35a2025-06-04 15:52:45 +0800246
Krishyab0cc1882025-06-09 10:54:09 +0800247 public void setHobbies(String hobbies) {
248 this.hobbies = hobbies;
249 }
223011385e9c35a2025-06-04 15:52:45 +0800250
Krishyab0cc1882025-06-09 10:54:09 +0800251 public Date getRegistrationTime() {
252 return registrationTime;
253 }
223011385e9c35a2025-06-04 15:52:45 +0800254
Krishyab0cc1882025-06-09 10:54:09 +0800255 public void setRegistrationTime(Date registrationTime) {
256 this.registrationTime = registrationTime;
257 }
223011385e9c35a2025-06-04 15:52:45 +0800258
Krishyab0cc1882025-06-09 10:54:09 +0800259 // 新增的lastupdatetime的getter和setter方法
260 public Date getLastupdatetime() {
261 return lastupdatetime;
262 }
223011385e9c35a2025-06-04 15:52:45 +0800263
Krishyab0cc1882025-06-09 10:54:09 +0800264 public void setLastupdatetime(Date lastupdatetime) {
265 this.lastupdatetime = lastupdatetime;
266 }
267}