22301102 | bc6da0a | 2025-06-02 17:47:29 +0800 | [diff] [blame] | 1 | package com.pt.entity; |
| 2 | |
| 3 | import jakarta.persistence.Entity; |
| 4 | import jakarta.persistence.GeneratedValue; |
| 5 | import jakarta.persistence.GenerationType; |
| 6 | import jakarta.persistence.Id; |
| 7 | |
| 8 | import java.time.LocalDateTime; |
| 9 | |
| 10 | @Entity |
| 11 | public class TorrentMeta { |
| 12 | @Id |
| 13 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
| 14 | private Long id; |
| 15 | |
| 16 | private String filename; |
| 17 | private String infoHash; |
| 18 | private Long size; |
| 19 | private LocalDateTime uploadTime; |
Edwardsamaxl | f1bf7ad | 2025-06-03 23:52:16 +0800 | [diff] [blame^] | 20 | private byte[] torrentData; |
22301102 | bc6da0a | 2025-06-02 17:47:29 +0800 | [diff] [blame] | 21 | |
| 22 | public Long getId() { |
| 23 | return id; |
| 24 | } |
| 25 | |
| 26 | public void setId(Long id) { |
| 27 | this.id = id; |
| 28 | } |
| 29 | |
| 30 | public String getFilename() { |
| 31 | return filename; |
| 32 | } |
| 33 | |
| 34 | public void setFilename(String filename) { |
| 35 | this.filename = filename; |
| 36 | } |
| 37 | |
| 38 | public String getInfoHash() { |
| 39 | return infoHash; |
| 40 | } |
| 41 | |
| 42 | public void setInfoHash(String infoHash) { |
| 43 | this.infoHash = infoHash; |
| 44 | } |
| 45 | |
| 46 | public Long getSize() { |
| 47 | return size; |
| 48 | } |
| 49 | |
| 50 | public void setSize(Long size) { |
| 51 | this.size = size; |
| 52 | } |
| 53 | |
| 54 | public LocalDateTime getUploadTime() { |
| 55 | return uploadTime; |
| 56 | } |
| 57 | |
| 58 | public void setUploadTime(LocalDateTime uploadTime) { |
| 59 | this.uploadTime = uploadTime; |
| 60 | } |
Edwardsamaxl | f1bf7ad | 2025-06-03 23:52:16 +0800 | [diff] [blame^] | 61 | |
| 62 | public byte[] getTorrentData() { |
| 63 | return torrentData; |
| 64 | } |
| 65 | |
| 66 | public void setTorrentData(byte[] torrentData) { |
| 67 | this.torrentData = torrentData; |
| 68 | } |
22301102 | bc6da0a | 2025-06-02 17:47:29 +0800 | [diff] [blame] | 69 | } |