添加bt与tracker交互
Change-Id: I1327c2ed89a76bee8e2abeb8cb3014b56357689a
diff --git a/src/main/java/com/pt/entity/PeerInfoEntity.java b/src/main/java/com/pt/entity/PeerInfoEntity.java
new file mode 100644
index 0000000..081df7f
--- /dev/null
+++ b/src/main/java/com/pt/entity/PeerInfoEntity.java
@@ -0,0 +1,66 @@
+package com.pt.entity;
+
+import jakarta.persistence.*;
+import java.time.LocalDateTime;
+
+@Entity
+public class PeerInfoEntity {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private Long id;
+
+ private String infoHash;
+ private String ip;
+ private int port;
+ private String peerId;
+ private LocalDateTime lastSeen;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getInfoHash() {
+ return infoHash;
+ }
+
+ public void setInfoHash(String infoHash) {
+ this.infoHash = infoHash;
+ }
+
+ public String getIp() {
+ return ip;
+ }
+
+ public void setIp(String ip) {
+ this.ip = ip;
+ }
+
+ public int getPort() {
+ return port;
+ }
+
+ public void setPort(int port) {
+ this.port = port;
+ }
+
+ public LocalDateTime getLastSeen() {
+ return lastSeen;
+ }
+
+ public void setLastSeen(LocalDateTime lastSeen) {
+ this.lastSeen = lastSeen;
+ }
+
+ public String getPeerId() {
+ return peerId;
+ }
+
+ public void setPeerId(String peerId) {
+ this.peerId = peerId;
+ }
+}