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 | |
Jin | 80d879a | 2025-06-09 20:53:18 +0800 | [diff] [blame^] | 80 | @Column(name = "money", nullable = false) |
| 81 | private Integer money; |
| 82 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 83 | // Getters and Setters |
Jin | 80d879a | 2025-06-09 20:53:18 +0800 | [diff] [blame^] | 84 | public Integer getMoney() { |
| 85 | return money; |
| 86 | } |
| 87 | public void setMoney(Integer money) { |
| 88 | this.money = money; |
| 89 | } |
| 90 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 91 | public Long getUserId() { |
| 92 | return userId; |
| 93 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 94 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 95 | public void setUserId(Long userId) { |
| 96 | this.userId = userId; |
| 97 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 98 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 99 | public String getUsername() { |
| 100 | return username; |
| 101 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 102 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 103 | public void setUsername(String username) { |
| 104 | this.username = username; |
| 105 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 106 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 107 | public String getAvatarUrl() { |
| 108 | return avatarUrl; |
| 109 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 110 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 111 | public void setAvatarUrl(String avatarUrl) { |
| 112 | this.avatarUrl = avatarUrl; |
| 113 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 114 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 115 | public String getEmail() { |
| 116 | return email; |
| 117 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 118 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 119 | public void setEmail(String email) { |
| 120 | this.email = email; |
| 121 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 122 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 123 | public String getPassword() { |
| 124 | return password; |
| 125 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 126 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 127 | public void setPassword(String password) { |
| 128 | this.password = password; |
| 129 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 130 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 131 | public String getRole() { |
| 132 | return role; |
| 133 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 134 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 135 | public void setRole(String role) { |
| 136 | this.role = role; |
| 137 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 138 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 139 | public Integer getInviteCount() { |
| 140 | return inviteCount; |
| 141 | } |
| 142 | |
| 143 | public void setInviteCount(Integer inviteCount) { |
| 144 | this.inviteCount = inviteCount; |
| 145 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 146 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 147 | public Long getLevel() { |
| 148 | return level; |
| 149 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 150 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 151 | public void setLevel(Long level) { |
| 152 | this.level = level; |
| 153 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 154 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 155 | public Float getUploadCount() { |
| 156 | return uploadCount; |
| 157 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 158 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 159 | public void setUploadCount(Float uploadCount) { |
| 160 | this.uploadCount = uploadCount; |
| 161 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 162 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 163 | public Float getDownloadCount() { |
| 164 | return downloadCount; |
| 165 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 166 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 167 | public void setDownloadCount(Float downloadCount) { |
| 168 | this.downloadCount = downloadCount; |
| 169 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 170 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 171 | public Float getShareRate() { |
| 172 | return shareRate; |
| 173 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 174 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 175 | public void setShareRate(Float shareRate) { |
| 176 | this.shareRate = shareRate; |
| 177 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 178 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 179 | public Date getRegistrationDate() { |
| 180 | return registrationDate; |
| 181 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 182 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 183 | public void setRegistrationDate(Date registrationDate) { |
| 184 | this.registrationDate = registrationDate; |
| 185 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 186 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 187 | public Date getLastLoginTime() { |
| 188 | return lastLoginTime; |
| 189 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 190 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 191 | public void setLastLoginTime(Date lastLoginTime) { |
| 192 | this.lastLoginTime = lastLoginTime; |
| 193 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 194 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 195 | public Integer getUserPoints() { |
| 196 | return userPoints; |
| 197 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 198 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 199 | public void setUserPoints(Integer userPoints) { |
| 200 | this.userPoints = userPoints; |
| 201 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 202 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 203 | public Boolean getIsPromo() { |
| 204 | return isPromo; |
| 205 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 206 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 207 | public void setIsPromo(Boolean isPromo) { |
| 208 | this.isPromo = isPromo; |
| 209 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 210 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 211 | public Integer getCurrentExperience() { |
| 212 | return currentExperience; |
| 213 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 214 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 215 | public void setCurrentExperience(Integer currentExperience) { |
| 216 | this.currentExperience = currentExperience; |
| 217 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 218 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 219 | public Float getCurrentSeedingHours() { |
| 220 | return currentSeedingHours; |
| 221 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 222 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 223 | public void setCurrentSeedingHours(Float currentSeedingHours) { |
| 224 | this.currentSeedingHours = currentSeedingHours; |
| 225 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 226 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 227 | public String getGender() { |
| 228 | return gender; |
| 229 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 230 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 231 | public void setGender(String gender) { |
| 232 | this.gender = gender; |
| 233 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 234 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 235 | public String getDescription() { |
| 236 | return description; |
| 237 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 238 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 239 | public void setDescription(String description) { |
| 240 | this.description = description; |
| 241 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 242 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 243 | public String getHobbies() { |
| 244 | return hobbies; |
| 245 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 246 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 247 | public void setHobbies(String hobbies) { |
| 248 | this.hobbies = hobbies; |
| 249 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 250 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 251 | public Date getRegistrationTime() { |
| 252 | return registrationTime; |
| 253 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 254 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 255 | public void setRegistrationTime(Date registrationTime) { |
| 256 | this.registrationTime = registrationTime; |
| 257 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 258 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 259 | // 新增的lastupdatetime的getter和setter方法 |
| 260 | public Date getLastupdatetime() { |
| 261 | return lastupdatetime; |
| 262 | } |
22301138 | 5e9c35a | 2025-06-04 15:52:45 +0800 | [diff] [blame] | 263 | |
Krishya | b0cc188 | 2025-06-09 10:54:09 +0800 | [diff] [blame] | 264 | public void setLastupdatetime(Date lastupdatetime) { |
| 265 | this.lastupdatetime = lastupdatetime; |
| 266 | } |
| 267 | } |