From 8ae1b3f0b77d745052e24a4a9db33d99daf2406b Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 29 Oct 2023 20:00:27 +0200 Subject: [PATCH] init torrent poster database #18 --- src/Entity/TorrentPoster.php | 117 +++++++++++++++++++++ src/Repository/TorrentPosterRepository.php | 23 ++++ 2 files changed, 140 insertions(+) create mode 100644 src/Entity/TorrentPoster.php create mode 100644 src/Repository/TorrentPosterRepository.php diff --git a/src/Entity/TorrentPoster.php b/src/Entity/TorrentPoster.php new file mode 100644 index 0000000..c866dea --- /dev/null +++ b/src/Entity/TorrentPoster.php @@ -0,0 +1,117 @@ +id; + } + + public function setId(string $id): static + { + $this->id = $id; + + return $this; + } + + public function getTorrentId(): ?int + { + return $this->torrentId; + } + + public function setTorrentId(int $torrentId): static + { + $this->torrentId = $torrentId; + + return $this; + } + + public function getUserId(): ?int + { + return $this->userId; + } + + public function setUserId(int $userId): static + { + $this->userId = $userId; + + return $this; + } + + public function getAdded(): ?int + { + return $this->added; + } + + public function setAdded(int $added): static + { + $this->added = $added; + + return $this; + } + + public function isApproved(): ?bool + { + return $this->approved; + } + + public function setApproved(bool $approved): static + { + $this->approved = $approved; + + return $this; + } + + public function getColor(): ?string + { + return $this->color; + } + + public function setColor(string $color): static + { + $this->color = $color; + + return $this; + } + + public function getMd5file(): ?string + { + return $this->md5file; + } + + public function setMd5file(string $md5file): static + { + $this->md5file = $md5file; + + return $this; + } +} diff --git a/src/Repository/TorrentPosterRepository.php b/src/Repository/TorrentPosterRepository.php new file mode 100644 index 0000000..235231c --- /dev/null +++ b/src/Repository/TorrentPosterRepository.php @@ -0,0 +1,23 @@ + + * + * @method TorrentPoster|null find($id, $lockMode = null, $lockVersion = null) + * @method TorrentPoster|null findOneBy(array $criteria, array $orderBy = null) + * @method TorrentPoster[] findAll() + * @method TorrentPoster[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class TorrentPosterRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, TorrentPoster::class); + } +}