wuchimedes | 079c163 | 2025-04-02 22:01:20 +0800 | [diff] [blame] | 1 | package com.example.g8backend.entity; |
| 2 | |
| 3 | import com.baomidou.mybatisplus.annotation.IdType; |
| 4 | import com.baomidou.mybatisplus.annotation.TableId; |
| 5 | import com.baomidou.mybatisplus.annotation.TableName; |
| 6 | import lombok.Data; |
| 7 | |
| 8 | @Data |
| 9 | @TableName("peers") |
| 10 | public class Peer { |
| 11 | @TableId(type = IdType.AUTO) |
| 12 | private Long peerId; |
| 13 | |
| 14 | private Long userId; |
| 15 | private Long torrentId; |
| 16 | private String ipAddress; |
| 17 | private Integer port; |
| 18 | private Double uploaded; |
| 19 | private Double downloaded; |
| 20 | |
| 21 | @Override |
| 22 | public String toString() { |
| 23 | return "Peer{" + |
| 24 | "peerId=" + peerId + |
| 25 | ", userId=" + userId + |
| 26 | ", torrentId=" + torrentId + |
| 27 | ", ipAddress='" + ipAddress + '\'' + |
| 28 | ", port=" + port + |
| 29 | ", uploaded=" + uploaded + |
| 30 | ", downloaded=" + downloaded + |
| 31 | '}'; |
| 32 | } |
| 33 | } |