mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2025-01-22 12:44:25 +00:00
init torrent poster database #18
This commit is contained in:
parent
997666ab8e
commit
8ae1b3f0b7
117
src/Entity/TorrentPoster.php
Normal file
117
src/Entity/TorrentPoster.php
Normal file
@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\TorrentPosterRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: TorrentPosterRepository::class)]
|
||||
class TorrentPoster
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?int $torrentId = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?int $userId = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?int $added = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?bool $approved = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $color = null;
|
||||
|
||||
#[ORM\Column(length: 32)]
|
||||
private ?string $md5file = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->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;
|
||||
}
|
||||
}
|
23
src/Repository/TorrentPosterRepository.php
Normal file
23
src/Repository/TorrentPosterRepository.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\TorrentPoster;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<TorrentPoster>
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user