draft torrent submit form #11

This commit is contained in:
ghost 2023-10-06 03:28:36 +03:00
parent b1fe274ae8
commit 8df29ef605
12 changed files with 810 additions and 6 deletions

103
src/Entity/Torrent.php Normal file
View file

@ -0,0 +1,103 @@
<?php
namespace App\Entity;
use App\Repository\TorrentRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: TorrentRepository::class)]
class Torrent
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $filename = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $keywords = null;
#[ORM\Column(nullable: true)]
private ?int $seeders = null;
#[ORM\Column(nullable: true)]
private ?int $peers = null;
#[ORM\Column(nullable: true)]
private ?int $leechers = null;
public function getId(): ?int
{
return $this->id;
}
public function setId(string $id): static
{
$this->id = $id;
return $this;
}
public function getFilename(): ?string
{
return $this->filename;
}
public function setFilename(string $filename): static
{
$this->filename = $filename;
return $this;
}
public function getKeywords(): ?string
{
return $this->keywords;
}
public function setKeywords(?string $keywords): static
{
$this->keywords = $keywords;
return $this;
}
public function getSeeders(): ?int
{
return $this->seeders;
}
public function setSeeders(?int $seeders): static
{
$this->seeders = $seeders;
return $this;
}
public function getPeers(): ?int
{
return $this->peers;
}
public function setPeers(?int $peers): static
{
$this->peers = $peers;
return $this;
}
public function getLeechers(): ?int
{
return $this->leechers;
}
public function setLeechers(?int $leechers): static
{
$this->leechers = $leechers;
return $this;
}
}

View file

@ -0,0 +1,103 @@
<?php
namespace App\Entity;
use App\Repository\TorrentLocalesRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: TorrentLocalesRepository::class)]
class TorrentLocales
{
#[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(type: Types::ARRAY)]
private array $value = [];
#[ORM\Column]
private ?bool $approved = 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 getValue(): array
{
return $this->value;
}
public function setValue(array $value): static
{
$this->value = $value;
return $this;
}
public function isApproved(): ?bool
{
return $this->approved;
}
public function setApproved(bool $approved): static
{
$this->approved = $approved;
return $this;
}
}

View file

@ -0,0 +1,103 @@
<?php
namespace App\Entity;
use App\Repository\TorrentSensitiveRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: TorrentSensitiveRepository::class)]
class TorrentSensitive
{
#[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 $value = null;
#[ORM\Column]
private ?bool $approved = 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 isValue(): ?bool
{
return $this->value;
}
public function setValue(bool $value): static
{
$this->value = $value;
return $this;
}
public function isApproved(): ?bool
{
return $this->approved;
}
public function setApproved(bool $approved): static
{
$this->approved = $approved;
return $this;
}
}