119 lines
2.2 KiB
PHP
119 lines
2.2 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Core\Doctrine\Timestampable;
|
|
use App\Core\Entity\EntityInterface;
|
|
use App\Repository\ProjectRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
#[ORM\Entity(repositoryClass: ProjectRepository::class)]
|
|
#[ORM\HasLifecycleCallbacks]
|
|
class Project implements EntityInterface
|
|
{
|
|
use Timestampable;
|
|
|
|
const DRAFT = 0;
|
|
const PUBLISHED = 1;
|
|
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\Column(type: 'integer')]
|
|
private $id;
|
|
|
|
#[ORM\Column(type: 'string', length: 255)]
|
|
private $label;
|
|
|
|
#[ORM\Column(type: 'text', nullable: true)]
|
|
private $description;
|
|
|
|
#[ORM\Column(type: 'integer', options: ['default' => 0])]
|
|
private $status = 0;
|
|
|
|
#[ORM\Column(type: 'integer', nullable: true)]
|
|
private $sortOrder;
|
|
|
|
#[ORM\Column(type: 'array')]
|
|
private $links = [];
|
|
|
|
#[ORM\Column(type: 'string', length: 255)]
|
|
private $image;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getLabel(): ?string
|
|
{
|
|
return $this->label;
|
|
}
|
|
|
|
public function setLabel(string $label): self
|
|
{
|
|
$this->label = $label;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getDescription(): ?string
|
|
{
|
|
return $this->description;
|
|
}
|
|
|
|
public function setDescription(?string $description): self
|
|
{
|
|
$this->description = $description;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getStatus(): ?int
|
|
{
|
|
return $this->status;
|
|
}
|
|
|
|
public function setStatus(int $status): self
|
|
{
|
|
$this->status = $status;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getSortOrder(): ?int
|
|
{
|
|
return $this->sortOrder;
|
|
}
|
|
|
|
public function setSortOrder(?int $sortOrder): self
|
|
{
|
|
$this->sortOrder = $sortOrder;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getLinks(): ?array
|
|
{
|
|
return $this->links;
|
|
}
|
|
|
|
public function setLinks(array $links): self
|
|
{
|
|
$this->links = $links;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getImage(): ?string
|
|
{
|
|
return $this->image;
|
|
}
|
|
|
|
public function setImage(string $image): self
|
|
{
|
|
$this->image = $image;
|
|
|
|
return $this;
|
|
}
|
|
}
|