作弊&促销

Change-Id: Ibdee947370e11c3a98912569e1a290b5e0968fbe
diff --git a/src/main/java/com/example/myproject/entity/AuditRecord.java b/src/main/java/com/example/myproject/entity/AuditRecord.java
new file mode 100644
index 0000000..ed8b9de
--- /dev/null
+++ b/src/main/java/com/example/myproject/entity/AuditRecord.java
@@ -0,0 +1,20 @@
+package com.example.myproject.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+@Data
+@TableName("audit_record")
+@ApiModel("种子实体类")
+public class AuditRecord {
+    private Integer id;
+    private Long torrentId;
+    private double upload;
+    private double download;
+    private LocalDateTime createTime;
+    public AuditRecord() {
+    }
+}
diff --git a/src/main/java/com/example/myproject/entity/BannedUser.java b/src/main/java/com/example/myproject/entity/BannedUser.java
new file mode 100644
index 0000000..a9aa2da
--- /dev/null
+++ b/src/main/java/com/example/myproject/entity/BannedUser.java
@@ -0,0 +1,27 @@
+package com.example.myproject.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+@Data
+@TableName("ba")
+public class BannedUser {
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    @ApiModelProperty(value = "用户ID", example = "1001")
+    @JsonProperty("userId")
+    @TableField("user_id")
+    private Long userId;
+
+    private String reason;
+    @JsonProperty("createTime")
+    @TableField("create_time")
+    private Date createTime;
+}
diff --git a/src/main/java/com/example/myproject/entity/SuspiciousUser.java b/src/main/java/com/example/myproject/entity/SuspiciousUser.java
new file mode 100644
index 0000000..8b15f08
--- /dev/null
+++ b/src/main/java/com/example/myproject/entity/SuspiciousUser.java
@@ -0,0 +1,35 @@
+package com.example.myproject.entity;
+
+
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+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.util.Date;
+
+@Data
+@TableName("suspicious_user")
+@ApiModel("列入怀疑用户")
+public class SuspiciousUser {
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    @ApiModelProperty(value = "用户ID", example = "1001")
+    @JsonProperty("userId")
+    @TableField("user_id")
+    private Long userId;
+    @ApiModelProperty(value = "上传速度", example = "1001")
+    @TableField("peed_kbs")
+    private double speedKBs;
+
+    private String reason;
+    @JsonProperty("createTime")
+    @TableField("create_time")
+    private Date createTime;
+}
\ No newline at end of file
diff --git a/src/main/java/com/example/myproject/entity/TorrentEntity.java b/src/main/java/com/example/myproject/entity/TorrentEntity.java
index f62fb76..b2b8192 100644
--- a/src/main/java/com/example/myproject/entity/TorrentEntity.java
+++ b/src/main/java/com/example/myproject/entity/TorrentEntity.java
@@ -93,6 +93,12 @@
     @JsonProperty("promotionUntil")
     @ApiModelProperty(value = "促销截止日期", example = "2024-12-31T23:59:59")
     private LocalDateTime promotionUntil;
+    @JsonProperty("upload_count")
+    @ApiModelProperty(value = "种子上传量", example = "false")
+    private double uploadCount;
+    @JsonProperty("down_count")
+    @ApiModelProperty(value = "种子下载量", example = "false")
+    private double downloadCount;
 
     
     @JsonProperty("torrentFile")
@@ -103,6 +109,7 @@
     @ApiModelProperty(value = "是否删除", example = "false")
     private Boolean isDeleted;
 
+
     public TorrentEntity() {
     }
 }
\ No newline at end of file
diff --git a/src/main/java/com/example/myproject/entity/TorrentReport.java b/src/main/java/com/example/myproject/entity/TorrentReport.java
index a019f9e..0d6de00 100644
--- a/src/main/java/com/example/myproject/entity/TorrentReport.java
+++ b/src/main/java/com/example/myproject/entity/TorrentReport.java
@@ -1,5 +1,7 @@
 package com.example.myproject.entity;
 
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
 import lombok.Builder;
 import lombok.Data;
 
@@ -24,5 +26,12 @@
     private String event;
     private String  ip;
     private Integer port;
+
     private LocalDateTime reportTime;
+    @PrePersist
+    public void prePersist() {
+        this.reportTime = LocalDateTime.now();
+    }
+
+
 }