blob: f1d0316b2f247e140abf7ca05f352d4cee3a3d45 [file] [log] [blame]
JinGefe5140c2025-06-06 20:07:42 +08001 package com.example.myproject.entity;
223011385e9c35a2025-06-04 15:52:45 +08002
JinGefe5140c2025-06-06 20:07:42 +08003 import javax.persistence.*;
4 import java.util.Date;
223011385e9c35a2025-06-04 15:52:45 +08005
JinGefe5140c2025-06-06 20:07:42 +08006 @Entity
7 @Table(name = "user")
8 public class Users {
223011385e9c35a2025-06-04 15:52:45 +08009
JinGefe5140c2025-06-06 20:07:42 +080010 @Id
11 @GeneratedValue(strategy = GenerationType.IDENTITY)
12 @Column(name = "user_id")
13 private Long userId;
223011385e9c35a2025-06-04 15:52:45 +080014
JinGefe5140c2025-06-06 20:07:42 +080015 @Column(name = "username", nullable = false,unique = true)
16 private String username;
223011385e9c35a2025-06-04 15:52:45 +080017
JinGefe5140c2025-06-06 20:07:42 +080018 @Column(name = "avatar_url", nullable = true)
19 private String avatarUrl;
223011385e9c35a2025-06-04 15:52:45 +080020
JinGefe5140c2025-06-06 20:07:42 +080021 @Column(name = "email", nullable = false)
22 private String email;
223011385e9c35a2025-06-04 15:52:45 +080023
JinGefe5140c2025-06-06 20:07:42 +080024 @Column(name = "password", nullable = false)
25 private String password;
223011385e9c35a2025-06-04 15:52:45 +080026
JinGefe5140c2025-06-06 20:07:42 +080027 @Column(name = "role", nullable = false)
28 private String role;
223011385e9c35a2025-06-04 15:52:45 +080029
JinGefe5140c2025-06-06 20:07:42 +080030 @Column(name = "invite_count")
31 private Integer inviteCount;
223011385e9c35a2025-06-04 15:52:45 +080032
JinGefe5140c2025-06-06 20:07:42 +080033 @Column(name = "level", nullable = false)
34 private Long level;
223011385e9c35a2025-06-04 15:52:45 +080035
JinGefe5140c2025-06-06 20:07:42 +080036 @Column(name = "upload_count")
37 private Float uploadCount;
223011385e9c35a2025-06-04 15:52:45 +080038
JinGefe5140c2025-06-06 20:07:42 +080039 @Column(name = "download_count")
40 private Float downloadCount;
223011385e9c35a2025-06-04 15:52:45 +080041
JinGefe5140c2025-06-06 20:07:42 +080042 @Column(name = "share_rate")
43 private Float shareRate;
223011385e9c35a2025-06-04 15:52:45 +080044
JinGefe5140c2025-06-06 20:07:42 +080045 @Column(name = "registration_date", nullable = false)
46 private Date registrationDate;
223011385e9c35a2025-06-04 15:52:45 +080047
JinGefe5140c2025-06-06 20:07:42 +080048 @Column(name = "last_login_time")
49 private Date lastLoginTime;
223011385e9c35a2025-06-04 15:52:45 +080050
JinGefe5140c2025-06-06 20:07:42 +080051 @Column(name = "user_points")
52 private Integer userPoints;
223011385e9c35a2025-06-04 15:52:45 +080053
JinGefe5140c2025-06-06 20:07:42 +080054 @Column(name = "is_promo")
55 private Boolean isPromo;
223011385e9c35a2025-06-04 15:52:45 +080056
JinGefe5140c2025-06-06 20:07:42 +080057 @Column(name = "current_experience", nullable = false)
58 private Integer currentExperience; // 当前经验值
223011385e9c35a2025-06-04 15:52:45 +080059
JinGefe5140c2025-06-06 20:07:42 +080060 @Column(name = "current_seeding_hours", nullable = false)
61 private Float currentSeedingHours; // 当前做种时长
223011385e9c35a2025-06-04 15:52:45 +080062
63
JinGefe5140c2025-06-06 20:07:42 +080064 @Column(name = "gender", nullable = true)
65 private String gender; // 性别
223011385e9c35a2025-06-04 15:52:45 +080066
JinGefe5140c2025-06-06 20:07:42 +080067 @Column(name = "description", nullable = true)
68 private String description; // 个人描述
223011385e9c35a2025-06-04 15:52:45 +080069
JinGefe5140c2025-06-06 20:07:42 +080070 @Column(name = "hobbies", nullable = true)
71 private String hobbies;
223011385e9c35a2025-06-04 15:52:45 +080072
JinGefe5140c2025-06-06 20:07:42 +080073 @Column(name = "registration_time", nullable = false, updatable = false)
74 @Temporal(TemporalType.TIMESTAMP)
75 private Date registrationTime;
223011385e9c35a2025-06-04 15:52:45 +080076
JinGefe5140c2025-06-06 20:07:42 +080077 // Getters and Setters
78 public Long getUserId() {
79 return userId;
80 }
223011385e9c35a2025-06-04 15:52:45 +080081
JinGefe5140c2025-06-06 20:07:42 +080082 public void setUserId(Long userId) {
83 this.userId = userId;
84 }
223011385e9c35a2025-06-04 15:52:45 +080085
JinGefe5140c2025-06-06 20:07:42 +080086 public String getUsername() {
87 return username;
88 }
223011385e9c35a2025-06-04 15:52:45 +080089
JinGefe5140c2025-06-06 20:07:42 +080090 public void setUsername(String username) {
91 this.username = username;
92 }
223011385e9c35a2025-06-04 15:52:45 +080093
JinGefe5140c2025-06-06 20:07:42 +080094 public String getAvatarUrl() {
95 return avatarUrl;
96 }
223011385e9c35a2025-06-04 15:52:45 +080097
JinGefe5140c2025-06-06 20:07:42 +080098 public void setAvatarUrl(String avatarUrl) {
99 this.avatarUrl = avatarUrl;
100 }
223011385e9c35a2025-06-04 15:52:45 +0800101
JinGefe5140c2025-06-06 20:07:42 +0800102 public String getEmail() {
103 return email;
104 }
223011385e9c35a2025-06-04 15:52:45 +0800105
JinGefe5140c2025-06-06 20:07:42 +0800106 public void setEmail(String email) {
107 this.email = email;
108 }
223011385e9c35a2025-06-04 15:52:45 +0800109
JinGefe5140c2025-06-06 20:07:42 +0800110 public String getPassword() {
111 return password;
112 }
223011385e9c35a2025-06-04 15:52:45 +0800113
JinGefe5140c2025-06-06 20:07:42 +0800114 public void setPassword(String password) {
115 this.password = password;
116 }
223011385e9c35a2025-06-04 15:52:45 +0800117
JinGefe5140c2025-06-06 20:07:42 +0800118 public String getRole() {
119 return role;
120 }
223011385e9c35a2025-06-04 15:52:45 +0800121
JinGefe5140c2025-06-06 20:07:42 +0800122 public void setRole(String role) {
123 this.role = role;
124 }
223011385e9c35a2025-06-04 15:52:45 +0800125
JinGefe5140c2025-06-06 20:07:42 +0800126 public Integer getInviteCount() {
127 return inviteCount;
128 }
223011385e9c35a2025-06-04 15:52:45 +0800129
JinGefe5140c2025-06-06 20:07:42 +0800130 public void setInviteCount(Integer inviteCount) {
131 this.inviteCount = inviteCount;
132 }
223011385e9c35a2025-06-04 15:52:45 +0800133
JinGefe5140c2025-06-06 20:07:42 +0800134 public Long getLevel() {
135 return level;
136 }
223011385e9c35a2025-06-04 15:52:45 +0800137
JinGefe5140c2025-06-06 20:07:42 +0800138 public void setLevel(Long level) {
139 this.level = level;
140 }
223011385e9c35a2025-06-04 15:52:45 +0800141
JinGefe5140c2025-06-06 20:07:42 +0800142 public Float getUploadCount() {
143 return uploadCount;
144 }
223011385e9c35a2025-06-04 15:52:45 +0800145
JinGefe5140c2025-06-06 20:07:42 +0800146 public void setUploadCount(Float uploadCount) {
147 this.uploadCount = uploadCount;
148 }
223011385e9c35a2025-06-04 15:52:45 +0800149
JinGefe5140c2025-06-06 20:07:42 +0800150 public Float getDownloadCount() {
151 return downloadCount;
152 }
223011385e9c35a2025-06-04 15:52:45 +0800153
JinGefe5140c2025-06-06 20:07:42 +0800154 public void setDownloadCount(Float downloadCount) {
155 this.downloadCount = downloadCount;
156 }
223011385e9c35a2025-06-04 15:52:45 +0800157
JinGefe5140c2025-06-06 20:07:42 +0800158 public Float getShareRate() {
159 return shareRate;
160 }
223011385e9c35a2025-06-04 15:52:45 +0800161
JinGefe5140c2025-06-06 20:07:42 +0800162 public void setShareRate(Float shareRate) {
163 this.shareRate = shareRate;
164 }
223011385e9c35a2025-06-04 15:52:45 +0800165
JinGefe5140c2025-06-06 20:07:42 +0800166 public Date getRegistrationDate() {
167 return registrationDate;
168 }
223011385e9c35a2025-06-04 15:52:45 +0800169
JinGefe5140c2025-06-06 20:07:42 +0800170 public void setRegistrationDate(Date registrationDate) {
171 this.registrationDate = registrationDate;
172 }
223011385e9c35a2025-06-04 15:52:45 +0800173
JinGefe5140c2025-06-06 20:07:42 +0800174 public Date getLastLoginTime() {
175 return lastLoginTime;
176 }
223011385e9c35a2025-06-04 15:52:45 +0800177
JinGefe5140c2025-06-06 20:07:42 +0800178 public void setLastLoginTime(Date lastLoginTime) {
179 this.lastLoginTime = lastLoginTime;
180 }
223011385e9c35a2025-06-04 15:52:45 +0800181
JinGefe5140c2025-06-06 20:07:42 +0800182 public Integer getUserPoints() {
183 return userPoints;
184 }
223011385e9c35a2025-06-04 15:52:45 +0800185
JinGefe5140c2025-06-06 20:07:42 +0800186 public void setUserPoints(Integer userPoints) {
187 this.userPoints = userPoints;
188 }
223011385e9c35a2025-06-04 15:52:45 +0800189
JinGefe5140c2025-06-06 20:07:42 +0800190 public Boolean getIsPromo() {
191 return isPromo;
192 }
223011385e9c35a2025-06-04 15:52:45 +0800193
JinGefe5140c2025-06-06 20:07:42 +0800194 public void setIsPromo(Boolean isPromo) {
195 this.isPromo = isPromo;
196 }
223011385e9c35a2025-06-04 15:52:45 +0800197
JinGefe5140c2025-06-06 20:07:42 +0800198 public Integer getCurrentExperience() {
199 return currentExperience;
200 }
223011385e9c35a2025-06-04 15:52:45 +0800201
JinGefe5140c2025-06-06 20:07:42 +0800202 public void setCurrentExperience(Integer currentExperience) {
203 this.currentExperience = currentExperience;
204 }
223011385e9c35a2025-06-04 15:52:45 +0800205
JinGefe5140c2025-06-06 20:07:42 +0800206 public Float getCurrentSeedingHours() {
207 return currentSeedingHours;
208 }
223011385e9c35a2025-06-04 15:52:45 +0800209
JinGefe5140c2025-06-06 20:07:42 +0800210 public void setCurrentSeedingHours(Float currentSeedingHours) {
211 this.currentSeedingHours = currentSeedingHours;
212 }
223011385e9c35a2025-06-04 15:52:45 +0800213
JinGefe5140c2025-06-06 20:07:42 +0800214 public String getGender() {
215 return gender;
216 }
223011385e9c35a2025-06-04 15:52:45 +0800217
JinGefe5140c2025-06-06 20:07:42 +0800218 public void setGender(String gender) {
219 this.gender = gender;
220 }
223011385e9c35a2025-06-04 15:52:45 +0800221
JinGefe5140c2025-06-06 20:07:42 +0800222 public String getDescription() {
223 return description;
224 }
223011385e9c35a2025-06-04 15:52:45 +0800225
JinGefe5140c2025-06-06 20:07:42 +0800226 public void setDescription(String description) {
227 this.description = description;
228 }
223011385e9c35a2025-06-04 15:52:45 +0800229
JinGefe5140c2025-06-06 20:07:42 +0800230 public String getHobbies() {
231 return hobbies;
232 }
223011385e9c35a2025-06-04 15:52:45 +0800233
JinGefe5140c2025-06-06 20:07:42 +0800234 public void setHobbies(String hobbies) {
235 this.hobbies = hobbies;
236 }
223011385e9c35a2025-06-04 15:52:45 +0800237
JinGefe5140c2025-06-06 20:07:42 +0800238 public Date getRegistrationTime() {
239 return registrationTime;
240 }
223011385e9c35a2025-06-04 15:52:45 +0800241
JinGefe5140c2025-06-06 20:07:42 +0800242 public void setRegistrationTime(Date registrationTime) {
243 this.registrationTime = registrationTime;
244 }
223011385e9c35a2025-06-04 15:52:45 +0800245
JinGefe5140c2025-06-06 20:07:42 +0800246 }