130 lines
2.6 KiB
PHP
130 lines
2.6 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\DomainRepository;
|
|
use Doctrine\DBAL\Types\Types;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Gedmo\Mapping\Annotation\Timestampable;
|
|
|
|
#[ORM\Entity(repositoryClass: DomainRepository::class)]
|
|
class Domain
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\Column]
|
|
private ?int $id = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $domain = null;
|
|
|
|
#[ORM\Column(length: 64)]
|
|
private ?string $ownerToken = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $name = null;
|
|
|
|
#[ORM\Column]
|
|
private ?bool $enabled = null;
|
|
|
|
#[ORM\Column(length: 32)]
|
|
private ?string $defaultSortPolicy = null;
|
|
|
|
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
|
|
#[Timestampable(on: "update")]
|
|
private ?\DateTimeInterface $updatedAt = null;
|
|
|
|
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
|
|
#[Timestampable(on: "create")]
|
|
private ?\DateTimeInterface $createdAt = null;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getDomain(): ?string
|
|
{
|
|
return $this->domain;
|
|
}
|
|
|
|
public function setDomain(string $domain): static
|
|
{
|
|
$this->domain = $domain;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getOwnerToken(): ?string
|
|
{
|
|
return $this->ownerToken;
|
|
}
|
|
|
|
public function setOwnerToken(string $ownerToken): static
|
|
{
|
|
$this->ownerToken = $ownerToken;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getName(): ?string
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
public function setName(string $name): static
|
|
{
|
|
$this->name = $name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function isEnabled(): ?bool
|
|
{
|
|
return $this->enabled;
|
|
}
|
|
|
|
public function setEnabled(bool $enabled): static
|
|
{
|
|
$this->enabled = $enabled;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getDefaultSortPolicy(): ?string
|
|
{
|
|
return $this->defaultSortPolicy;
|
|
}
|
|
|
|
public function setDefaultSortPolicy(string $defaultSortPolicy): static
|
|
{
|
|
$this->defaultSortPolicy = $defaultSortPolicy;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getUpdatedAt(): ?\DateTimeInterface
|
|
{
|
|
return $this->updatedAt;
|
|
}
|
|
|
|
public function setUpdatedAt(?\DateTimeInterface $updatedAt): static
|
|
{
|
|
$this->updatedAt = $updatedAt;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getCreatedAt(): ?\DateTimeInterface
|
|
{
|
|
return $this->createdAt;
|
|
}
|
|
|
|
public function setCreatedAt(\DateTimeInterface $createdAt): static
|
|
{
|
|
$this->createdAt = $createdAt;
|
|
|
|
return $this;
|
|
}
|
|
}
|