Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 1 | package com.example.myproject.entity; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 2 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 3 | import javax.persistence.*; |
| 4 | import java.util.Date; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 5 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 6 | @Entity |
| 7 | @Table(name = "user") |
| 8 | public class Users { |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 9 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 10 | @Id |
| 11 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| 12 | @Column(name = "user_id") |
| 13 | private Long userId; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 14 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 15 | @Column(name = "username", nullable = false,unique = true) |
| 16 | private String username; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 17 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 18 | @Column(name = "avatar_url", nullable = true) |
| 19 | private String avatarUrl; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 20 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 21 | @Column(name = "email", nullable = false) |
| 22 | private String email; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 23 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 24 | @Column(name = "password", nullable = false) |
| 25 | private String password; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 26 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 27 | @Column(name = "role", nullable = false) |
| 28 | private String role; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 29 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 30 | @Column(name = "invite_count") |
| 31 | private Integer inviteCount; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 32 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 33 | @Column(name = "level", nullable = false) |
| 34 | private Long level; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 35 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 36 | @Column(name = "upload_count") |
| 37 | private Float uploadCount; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 38 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 39 | @Column(name = "download_count") |
| 40 | private Float downloadCount; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 41 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 42 | @Column(name = "share_rate") |
| 43 | private Float shareRate; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 44 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 45 | @Column(name = "registration_date", nullable = false) |
| 46 | private Date registrationDate; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 47 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 48 | @Column(name = "last_login_time") |
| 49 | private Date lastLoginTime; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 50 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 51 | @Column(name = "user_points") |
| 52 | private Integer userPoints; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 53 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 54 | @Column(name = "is_promo") |
| 55 | private Boolean isPromo; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 56 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 57 | @Column(name = "current_experience", nullable = false) |
| 58 | private Integer currentExperience; // 当前经验值 |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 59 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 60 | @Column(name = "current_seeding_hours", nullable = false) |
| 61 | private Float currentSeedingHours; // 当前做种时长 |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 62 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 63 | @Column(name = "gender", nullable = true) |
| 64 | private String gender; // 性别 |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 65 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 66 | @Column(name = "description", nullable = true) |
| 67 | private String description; // 个人描述 |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 68 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 69 | @Column(name = "hobbies", nullable = true) |
| 70 | private String hobbies; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 71 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 72 | @Column(name = "registration_time", nullable = false, updatable = false) |
| 73 | @Temporal(TemporalType.TIMESTAMP) |
| 74 | private Date registrationTime; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 75 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 76 | // 新增的lastupdatetime字段 |
| 77 | @Column(name = "lastupdatetime") |
| 78 | private Date lastupdatetime; |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 79 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 80 | // Getters and Setters |
| 81 | public Long getUserId() { |
| 82 | return userId; |
| 83 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 84 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 85 | public void setUserId(Long userId) { |
| 86 | this.userId = userId; |
| 87 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 88 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 89 | public String getUsername() { |
| 90 | return username; |
| 91 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 92 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 93 | public void setUsername(String username) { |
| 94 | this.username = username; |
| 95 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 96 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 97 | public String getAvatarUrl() { |
| 98 | return avatarUrl; |
| 99 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 100 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 101 | public void setAvatarUrl(String avatarUrl) { |
| 102 | this.avatarUrl = avatarUrl; |
| 103 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 104 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 105 | public String getEmail() { |
| 106 | return email; |
| 107 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 108 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 109 | public void setEmail(String email) { |
| 110 | this.email = email; |
| 111 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 112 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 113 | public String getPassword() { |
| 114 | return password; |
| 115 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 116 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 117 | public void setPassword(String password) { |
| 118 | this.password = password; |
| 119 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 120 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 121 | public String getRole() { |
| 122 | return role; |
| 123 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 124 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 125 | public void setRole(String role) { |
| 126 | this.role = role; |
| 127 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 128 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 129 | public Integer getInviteCount() { |
| 130 | return inviteCount; |
| 131 | } |
| 132 | |
| 133 | public void setInviteCount(Integer inviteCount) { |
| 134 | this.inviteCount = inviteCount; |
| 135 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 136 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 137 | public Long getLevel() { |
| 138 | return level; |
| 139 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 140 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 141 | public void setLevel(Long level) { |
| 142 | this.level = level; |
| 143 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 144 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 145 | public Float getUploadCount() { |
| 146 | return uploadCount; |
| 147 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 148 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 149 | public void setUploadCount(Float uploadCount) { |
| 150 | this.uploadCount = uploadCount; |
| 151 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 152 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 153 | public Float getDownloadCount() { |
| 154 | return downloadCount; |
| 155 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 156 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 157 | public void setDownloadCount(Float downloadCount) { |
| 158 | this.downloadCount = downloadCount; |
| 159 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 160 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 161 | public Float getShareRate() { |
| 162 | return shareRate; |
| 163 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 164 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 165 | public void setShareRate(Float shareRate) { |
| 166 | this.shareRate = shareRate; |
| 167 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 168 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 169 | public Date getRegistrationDate() { |
| 170 | return registrationDate; |
| 171 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 172 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 173 | public void setRegistrationDate(Date registrationDate) { |
| 174 | this.registrationDate = registrationDate; |
| 175 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 176 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 177 | public Date getLastLoginTime() { |
| 178 | return lastLoginTime; |
| 179 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 180 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 181 | public void setLastLoginTime(Date lastLoginTime) { |
| 182 | this.lastLoginTime = lastLoginTime; |
| 183 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 184 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 185 | public Integer getUserPoints() { |
| 186 | return userPoints; |
| 187 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 188 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 189 | public void setUserPoints(Integer userPoints) { |
| 190 | this.userPoints = userPoints; |
| 191 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 192 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 193 | public Boolean getIsPromo() { |
| 194 | return isPromo; |
| 195 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 196 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 197 | public void setIsPromo(Boolean isPromo) { |
| 198 | this.isPromo = isPromo; |
| 199 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 200 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 201 | public Integer getCurrentExperience() { |
| 202 | return currentExperience; |
| 203 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 204 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 205 | public void setCurrentExperience(Integer currentExperience) { |
| 206 | this.currentExperience = currentExperience; |
| 207 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 208 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 209 | public Float getCurrentSeedingHours() { |
| 210 | return currentSeedingHours; |
| 211 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 212 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 213 | public void setCurrentSeedingHours(Float currentSeedingHours) { |
| 214 | this.currentSeedingHours = currentSeedingHours; |
| 215 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 216 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 217 | public String getGender() { |
| 218 | return gender; |
| 219 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 220 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 221 | public void setGender(String gender) { |
| 222 | this.gender = gender; |
| 223 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 224 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 225 | public String getDescription() { |
| 226 | return description; |
| 227 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 228 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 229 | public void setDescription(String description) { |
| 230 | this.description = description; |
| 231 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 232 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 233 | public String getHobbies() { |
| 234 | return hobbies; |
| 235 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 236 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 237 | public void setHobbies(String hobbies) { |
| 238 | this.hobbies = hobbies; |
| 239 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 240 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 241 | public Date getRegistrationTime() { |
| 242 | return registrationTime; |
| 243 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 244 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 245 | public void setRegistrationTime(Date registrationTime) { |
| 246 | this.registrationTime = registrationTime; |
| 247 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 248 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 249 | // 新增的lastupdatetime的getter和setter方法 |
| 250 | public Date getLastupdatetime() { |
| 251 | return lastupdatetime; |
| 252 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 253 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame^] | 254 | public void setLastupdatetime(Date lastupdatetime) { |
| 255 | this.lastupdatetime = lastupdatetime; |
| 256 | } |
| 257 | } |