86133 | ec55c54 | 2025-04-21 11:51:32 +0800 | [diff] [blame^] | 1 | |
| 2 | |
| 3 | /** 种子主表 */ |
| 4 | export interface BtTorrent { |
| 5 | /** 种子ID */ |
| 6 | torrentId: number; |
| 7 | /** InfoHash */ |
| 8 | infoHash: string; |
| 9 | /** 种子名称 */ |
| 10 | name: string; |
| 11 | /** 总大小(字节) */ |
| 12 | length: number; |
| 13 | /** 每个 piece 的长度 */ |
| 14 | pieceLength: number; |
| 15 | /** piece 总数 */ |
| 16 | piecesCount: number; |
| 17 | /** 创建工具(如 qBittorrent) */ |
| 18 | createdBy: string; |
| 19 | /** .torrent 内的创建时间 */ |
| 20 | torrentCreateTime: Date | null; |
| 21 | /** 上传用户ID(sys_user.userId) */ |
| 22 | uploaderId: number; |
| 23 | /** 上传时间 */ |
| 24 | uploadTime: Date; |
| 25 | /** 种子文件存储路径(服务器端路径或 URL) */ |
| 26 | filePath: string; |
| 27 | } |
| 28 | |
| 29 | /** 种子文件列表 */ |
| 30 | export interface BtTorrentFile { |
| 31 | /** 文件记录ID */ |
| 32 | id: number; |
| 33 | /** 种子ID */ |
| 34 | torrentId: number; |
| 35 | /** 文件路径 */ |
| 36 | filePath: string; |
| 37 | /** 文件大小 */ |
| 38 | fileSize: number; |
| 39 | } |
| 40 | |
| 41 | /** announce 列表 */ |
| 42 | export interface BtTorrentAnnounce { |
| 43 | /** ID */ |
| 44 | id: number; |
| 45 | /** 种子ID */ |
| 46 | torrentId: number; |
| 47 | /** Tracker URL */ |
| 48 | announceUrl: string; |
| 49 | } |
| 50 | |
| 51 | /** 标签表(可选) */ |
| 52 | export interface BtTorrentTag { |
| 53 | /** ID */ |
| 54 | id: number; |
| 55 | /** 种子ID */ |
| 56 | torrentId: number; |
| 57 | /** 标签内容 */ |
| 58 | tag: string; |
| 59 | } |