调试交互
Change-Id: Ib9d7b8432cb622c7e28c842ab4dc4e156fcd6414
diff --git a/src/main/java/com/example/myproject/entity/TorrentReport.java b/src/main/java/com/example/myproject/entity/TorrentReport.java
new file mode 100644
index 0000000..a019f9e
--- /dev/null
+++ b/src/main/java/com/example/myproject/entity/TorrentReport.java
@@ -0,0 +1,28 @@
+package com.example.myproject.entity;
+
+import lombok.Builder;
+import lombok.Data;
+
+import javax.persistence.*;
+import java.time.LocalDateTime;
+
+@Data
+@Builder
+@Entity
+public class TorrentReport {
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private Integer id;
+ private Integer userId;
+ private String peerId;
+ private Long torrentId;
+ private String infoHash;
+ private Long uploaded;
+ private Long downloaded;
+ @Column(name = "`left`")
+ private Long left;
+ private String event;
+ private String ip;
+ private Integer port;
+ private LocalDateTime reportTime;
+}
diff --git a/src/main/java/com/example/myproject/entity/User.java b/src/main/java/com/example/myproject/entity/User.java
index 7574e67..71ccfe1 100644
--- a/src/main/java/com/example/myproject/entity/User.java
+++ b/src/main/java/com/example/myproject/entity/User.java
@@ -1,3 +1,80 @@
+//package com.example.myproject.entity;
+//
+//
+//import com.baomidou.mybatisplus.annotation.IdType;
+//import com.baomidou.mybatisplus.annotation.TableId;
+//import com.baomidou.mybatisplus.annotation.TableName;
+//import com.fasterxml.jackson.annotation.JsonProperty;
+//import io.swagger.annotations.ApiModel;
+//import io.swagger.annotations.ApiModelProperty;
+//import lombok.Data;
+//
+//import java.time.LocalDateTime;
+//
+//@Data
+//@TableName("user") // 指定数据库表名
+//@ApiModel("用户实体类") // 用于描述模型
+//public class User {
+//
+// @TableId(type = IdType.AUTO) // 指定主键策略
+// @ApiModelProperty(value = "用户ID", example = "1")
+// private Long id;
+//
+// @JsonProperty("username")
+// @ApiModelProperty(value = "用户名", example = "22301115")
+// private String username;
+//
+// @JsonProperty("nickname")
+// @ApiModelProperty(value = "昵称", example = "cyl")
+// private String nickname;
+//
+// @JsonProperty("role")
+// @ApiModelProperty(value = "角色", example = "Student")
+// private String role;
+//
+// @JsonProperty("password")
+// @ApiModelProperty(value = "密码", example = "123")
+// private String password;
+//
+// @JsonProperty("status")
+// @ApiModelProperty(value = "用户状态", example = "1")
+// private int status;
+//
+// @JsonProperty("email")
+// @ApiModelProperty(value = "电子邮件地址", example = "john_doe@example.com")
+// private String email;
+//
+// @JsonProperty("email_verified")
+// @ApiModelProperty(value = "邮箱验证状态", example = "true")
+// private boolean emailVerified;
+//
+// @JsonProperty("avatar")
+// @ApiModelProperty(value = "头像")
+// private String avatar;
+//
+// @JsonProperty("uploaded")
+// @ApiModelProperty(value = "上传量", example = "1000")
+// private Long uploaded;
+//
+// @JsonProperty("downloaded")
+// @ApiModelProperty(value = "下载量", example = "500")
+// private Long downloaded;
+//
+// @JsonProperty("create_time")
+// @ApiModelProperty(value = "创建时间", example = "2024-04-01T12:00:00")
+// private LocalDateTime createTime;
+//
+// @JsonProperty("update_time")
+// @ApiModelProperty(value = "更新时间", example = "2024-04-01T12:00:00")
+// private LocalDateTime updateTime;
+//
+// @JsonProperty("is_deleted")
+// @ApiModelProperty(value = "是否删除", example = "false")
+// private Boolean isDeleted;
+//
+// public User() {
+// }
+//}
package com.example.myproject.entity;
diff --git a/src/main/java/com/example/myproject/entity/Users.java b/src/main/java/com/example/myproject/entity/Users.java
index ebe793f..f1d0316 100644
--- a/src/main/java/com/example/myproject/entity/Users.java
+++ b/src/main/java/com/example/myproject/entity/Users.java
@@ -1,246 +1,246 @@
-package com.example.myproject.entity;
+ package com.example.myproject.entity;
-import javax.persistence.*;
-import java.util.Date;
+ import javax.persistence.*;
+ import java.util.Date;
-@Entity
-@Table(name = "user")
-public class Users {
+ @Entity
+ @Table(name = "user")
+ public class Users {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "user_id")
- private Long userId;
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "user_id")
+ private Long userId;
- @Column(name = "username", nullable = false,unique = true)
- private String username;
+ @Column(name = "username", nullable = false,unique = true)
+ private String username;
- @Column(name = "avatar_url", nullable = true)
- private String avatarUrl;
+ @Column(name = "avatar_url", nullable = true)
+ private String avatarUrl;
- @Column(name = "email", nullable = false)
- private String email;
+ @Column(name = "email", nullable = false)
+ private String email;
- @Column(name = "password", nullable = false)
- private String password;
+ @Column(name = "password", nullable = false)
+ private String password;
- @Column(name = "role", nullable = false)
- private String role;
+ @Column(name = "role", nullable = false)
+ private String role;
- @Column(name = "invite_count")
- private Integer inviteCount;
+ @Column(name = "invite_count")
+ private Integer inviteCount;
- @Column(name = "level", nullable = false)
- private Long level;
+ @Column(name = "level", nullable = false)
+ private Long level;
- @Column(name = "upload_count")
- private Float uploadCount;
+ @Column(name = "upload_count")
+ private Float uploadCount;
- @Column(name = "download_count")
- private Float downloadCount;
+ @Column(name = "download_count")
+ private Float downloadCount;
- @Column(name = "share_rate")
- private Float shareRate;
+ @Column(name = "share_rate")
+ private Float shareRate;
- @Column(name = "registration_date", nullable = false)
- private Date registrationDate;
+ @Column(name = "registration_date", nullable = false)
+ private Date registrationDate;
- @Column(name = "last_login_time")
- private Date lastLoginTime;
+ @Column(name = "last_login_time")
+ private Date lastLoginTime;
- @Column(name = "user_points")
- private Integer userPoints;
+ @Column(name = "user_points")
+ private Integer userPoints;
- @Column(name = "is_promo")
- private Boolean isPromo;
+ @Column(name = "is_promo")
+ private Boolean isPromo;
- @Column(name = "current_experience", nullable = false)
- private Integer currentExperience; // 当前经验值
+ @Column(name = "current_experience", nullable = false)
+ private Integer currentExperience; // 当前经验值
- @Column(name = "current_seeding_hours", nullable = false)
- private Float currentSeedingHours; // 当前做种时长
+ @Column(name = "current_seeding_hours", nullable = false)
+ private Float currentSeedingHours; // 当前做种时长
- @Column(name = "gender", nullable = true)
- private String gender; // 性别
+ @Column(name = "gender", nullable = true)
+ private String gender; // 性别
- @Column(name = "description", nullable = true)
- private String description; // 个人描述
+ @Column(name = "description", nullable = true)
+ private String description; // 个人描述
- @Column(name = "hobbies", nullable = true)
- private String hobbies;
+ @Column(name = "hobbies", nullable = true)
+ private String hobbies;
- @Column(name = "registration_time", nullable = false, updatable = false)
- @Temporal(TemporalType.TIMESTAMP)
- private Date registrationTime;
+ @Column(name = "registration_time", nullable = false, updatable = false)
+ @Temporal(TemporalType.TIMESTAMP)
+ private Date registrationTime;
- // Getters and Setters
- public Long getUserId() {
- return userId;
- }
+ // Getters and Setters
+ public Long getUserId() {
+ return userId;
+ }
- public void setUserId(Long userId) {
- this.userId = userId;
- }
+ public void setUserId(Long userId) {
+ this.userId = userId;
+ }
- public String getUsername() {
- return username;
- }
+ public String getUsername() {
+ return username;
+ }
- public void setUsername(String username) {
- this.username = username;
- }
+ public void setUsername(String username) {
+ this.username = username;
+ }
- public String getAvatarUrl() {
- return avatarUrl;
- }
+ public String getAvatarUrl() {
+ return avatarUrl;
+ }
- public void setAvatarUrl(String avatarUrl) {
- this.avatarUrl = avatarUrl;
- }
+ public void setAvatarUrl(String avatarUrl) {
+ this.avatarUrl = avatarUrl;
+ }
- public String getEmail() {
- return email;
- }
+ public String getEmail() {
+ return email;
+ }
- public void setEmail(String email) {
- this.email = email;
- }
+ public void setEmail(String email) {
+ this.email = email;
+ }
- public String getPassword() {
- return password;
- }
+ public String getPassword() {
+ return password;
+ }
- public void setPassword(String password) {
- this.password = password;
- }
+ public void setPassword(String password) {
+ this.password = password;
+ }
- public String getRole() {
- return role;
- }
+ public String getRole() {
+ return role;
+ }
- public void setRole(String role) {
- this.role = role;
- }
+ public void setRole(String role) {
+ this.role = role;
+ }
- public Integer getInviteCount() {
- return inviteCount;
- }
+ public Integer getInviteCount() {
+ return inviteCount;
+ }
- public void setInviteCount(Integer inviteCount) {
- this.inviteCount = inviteCount;
- }
+ public void setInviteCount(Integer inviteCount) {
+ this.inviteCount = inviteCount;
+ }
- public Long getLevel() {
- return level;
- }
+ public Long getLevel() {
+ return level;
+ }
- public void setLevel(Long level) {
- this.level = level;
- }
+ public void setLevel(Long level) {
+ this.level = level;
+ }
- public Float getUploadCount() {
- return uploadCount;
- }
+ public Float getUploadCount() {
+ return uploadCount;
+ }
- public void setUploadCount(Float uploadCount) {
- this.uploadCount = uploadCount;
- }
+ public void setUploadCount(Float uploadCount) {
+ this.uploadCount = uploadCount;
+ }
- public Float getDownloadCount() {
- return downloadCount;
- }
+ public Float getDownloadCount() {
+ return downloadCount;
+ }
- public void setDownloadCount(Float downloadCount) {
- this.downloadCount = downloadCount;
- }
+ public void setDownloadCount(Float downloadCount) {
+ this.downloadCount = downloadCount;
+ }
- public Float getShareRate() {
- return shareRate;
- }
+ public Float getShareRate() {
+ return shareRate;
+ }
- public void setShareRate(Float shareRate) {
- this.shareRate = shareRate;
- }
+ public void setShareRate(Float shareRate) {
+ this.shareRate = shareRate;
+ }
- public Date getRegistrationDate() {
- return registrationDate;
- }
+ public Date getRegistrationDate() {
+ return registrationDate;
+ }
- public void setRegistrationDate(Date registrationDate) {
- this.registrationDate = registrationDate;
- }
+ public void setRegistrationDate(Date registrationDate) {
+ this.registrationDate = registrationDate;
+ }
- public Date getLastLoginTime() {
- return lastLoginTime;
- }
+ public Date getLastLoginTime() {
+ return lastLoginTime;
+ }
- public void setLastLoginTime(Date lastLoginTime) {
- this.lastLoginTime = lastLoginTime;
- }
+ public void setLastLoginTime(Date lastLoginTime) {
+ this.lastLoginTime = lastLoginTime;
+ }
- public Integer getUserPoints() {
- return userPoints;
- }
+ public Integer getUserPoints() {
+ return userPoints;
+ }
- public void setUserPoints(Integer userPoints) {
- this.userPoints = userPoints;
- }
+ public void setUserPoints(Integer userPoints) {
+ this.userPoints = userPoints;
+ }
- public Boolean getIsPromo() {
- return isPromo;
- }
+ public Boolean getIsPromo() {
+ return isPromo;
+ }
- public void setIsPromo(Boolean isPromo) {
- this.isPromo = isPromo;
- }
+ public void setIsPromo(Boolean isPromo) {
+ this.isPromo = isPromo;
+ }
- public Integer getCurrentExperience() {
- return currentExperience;
- }
+ public Integer getCurrentExperience() {
+ return currentExperience;
+ }
- public void setCurrentExperience(Integer currentExperience) {
- this.currentExperience = currentExperience;
- }
+ public void setCurrentExperience(Integer currentExperience) {
+ this.currentExperience = currentExperience;
+ }
- public Float getCurrentSeedingHours() {
- return currentSeedingHours;
- }
+ public Float getCurrentSeedingHours() {
+ return currentSeedingHours;
+ }
- public void setCurrentSeedingHours(Float currentSeedingHours) {
- this.currentSeedingHours = currentSeedingHours;
- }
+ public void setCurrentSeedingHours(Float currentSeedingHours) {
+ this.currentSeedingHours = currentSeedingHours;
+ }
- public String getGender() {
- return gender;
- }
+ public String getGender() {
+ return gender;
+ }
- public void setGender(String gender) {
- this.gender = gender;
- }
+ public void setGender(String gender) {
+ this.gender = gender;
+ }
- public String getDescription() {
- return description;
- }
+ public String getDescription() {
+ return description;
+ }
- public void setDescription(String description) {
- this.description = description;
- }
+ public void setDescription(String description) {
+ this.description = description;
+ }
- public String getHobbies() {
- return hobbies;
- }
+ public String getHobbies() {
+ return hobbies;
+ }
- public void setHobbies(String hobbies) {
- this.hobbies = hobbies;
- }
+ public void setHobbies(String hobbies) {
+ this.hobbies = hobbies;
+ }
- public Date getRegistrationTime() {
- return registrationTime;
- }
+ public Date getRegistrationTime() {
+ return registrationTime;
+ }
- public void setRegistrationTime(Date registrationTime) {
- this.registrationTime = registrationTime;
- }
+ public void setRegistrationTime(Date registrationTime) {
+ this.registrationTime = registrationTime;
+ }
-}
+ }