mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-04-01 01:25:39 +00:00
update torrent features
This commit is contained in:
parent
d1f8c126b0
commit
e713c17333
16 changed files with 661 additions and 329 deletions
|
|
@ -6,7 +6,6 @@ use App\Repository\TorrentRepository;
|
|||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
// @TODO #[ORM\Index(columns: ['keywords'], name: 'keywords_idx', flags: ['fulltext'])]
|
||||
#[ORM\Entity(repositoryClass: TorrentRepository::class)]
|
||||
|
||||
class Torrent
|
||||
|
|
@ -25,14 +24,20 @@ class Torrent
|
|||
#[ORM\Column(nullable: true)]
|
||||
private ?int $scraped = null;
|
||||
|
||||
#[ORM\Column(type: Types::SIMPLE_ARRAY)]
|
||||
private array $locales = [];
|
||||
|
||||
#[ORM\Column]
|
||||
private ?bool $sensitive = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?bool $approved = null;
|
||||
|
||||
#[ORM\Column(length: 32)]
|
||||
private ?string $md5file = null;
|
||||
|
||||
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||
private ?string $keywords = null;
|
||||
#[ORM\Column(type: Types::SIMPLE_ARRAY, nullable: true)]
|
||||
private ?array $keywords = null;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?int $seeders = null;
|
||||
|
|
@ -103,18 +108,42 @@ class Torrent
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function getKeywords(): ?string
|
||||
public function getKeywords(): ?array
|
||||
{
|
||||
return $this->keywords;
|
||||
}
|
||||
|
||||
public function setKeywords(?string $keywords): static
|
||||
public function setKeywords(?array $keywords): static
|
||||
{
|
||||
$this->keywords = $keywords;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLocales(): array
|
||||
{
|
||||
return $this->locales;
|
||||
}
|
||||
|
||||
public function setLocales(array $locales): static
|
||||
{
|
||||
$this->locales = $locales;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isSensitive(): ?bool
|
||||
{
|
||||
return $this->sensitive;
|
||||
}
|
||||
|
||||
public function setSensitive(bool $sensitive): static
|
||||
{
|
||||
$this->sensitive = $sensitive;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isApproved(): ?bool
|
||||
{
|
||||
return $this->approved;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class TorrentLocales
|
|||
#[ORM\Column]
|
||||
private ?int $added = null;
|
||||
|
||||
#[ORM\Column(type: Types::ARRAY)]
|
||||
#[ORM\Column(type: Types::SIMPLE_ARRAY)]
|
||||
private array $value = [];
|
||||
|
||||
#[ORM\Column]
|
||||
|
|
|
|||
|
|
@ -32,10 +32,10 @@ class User
|
|||
#[ORM\Column(length: 2)]
|
||||
private ?string $locale = null;
|
||||
|
||||
#[ORM\Column(type: Types::ARRAY)]
|
||||
#[ORM\Column(type: Types::SIMPLE_ARRAY)]
|
||||
private array $locales = [];
|
||||
|
||||
#[ORM\Column(type: Types::ARRAY)]
|
||||
#[ORM\Column(type: Types::SIMPLE_ARRAY)]
|
||||
private array $events = [];
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue