|
@@ -2,18 +2,20 @@
|
|
|
|
|
|
namespace App\Entity;
|
|
namespace App\Entity;
|
|
|
|
|
|
|
|
+use App\Config\View;
|
|
use App\Repository\ProfileRepository;
|
|
use App\Repository\ProfileRepository;
|
|
|
|
+use Doctrine\DBAL\Types\Types;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
|
|
#[ORM\Entity(repositoryClass: ProfileRepository::class)]
|
|
#[ORM\Entity(repositoryClass: ProfileRepository::class)]
|
|
class Profile
|
|
class Profile
|
|
{
|
|
{
|
|
- public static $VIEW = ['liste' => 0, 'vignette' => 1];
|
|
|
|
|
|
+ //public static $VIEW = ['liste' => 0, 'vignette' => 1];
|
|
|
|
|
|
|
|
|
|
#[ORM\Id]
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\GeneratedValue]
|
|
- #[ORM\Column(type: "integer")]
|
|
|
|
|
|
+ #[ORM\Column(type: Types::INTEGER)]
|
|
|
|
|
|
private ?int $id = null;
|
|
private ?int $id = null;
|
|
|
|
|
|
@@ -24,13 +26,13 @@ class Profile
|
|
private ?User $user = null;
|
|
private ?User $user = null;
|
|
|
|
|
|
|
|
|
|
- #[ORM\Column(type: "integer")]
|
|
|
|
|
|
+ #[ORM\Column(type: Types::INTEGER)]
|
|
|
|
|
|
- private ?int $view = null;
|
|
|
|
|
|
+ private ?View $view = null;
|
|
|
|
|
|
public function __construct()
|
|
public function __construct()
|
|
{
|
|
{
|
|
- $this->setView(Profile::$VIEW['vignette']);
|
|
|
|
|
|
+ $this->setView(View::VIGNETTE);
|
|
}
|
|
}
|
|
|
|
|
|
public function getId(): ?int
|
|
public function getId(): ?int
|
|
@@ -50,12 +52,12 @@ class Profile
|
|
return $this;
|
|
return $this;
|
|
}
|
|
}
|
|
|
|
|
|
- public function getView(): ?int
|
|
|
|
|
|
+ public function getView(): ?View
|
|
{
|
|
{
|
|
return $this->view;
|
|
return $this->view;
|
|
}
|
|
}
|
|
|
|
|
|
- public function setView(?int $view): self
|
|
|
|
|
|
+ public function setView(?View $view): self
|
|
{
|
|
{
|
|
$this->view = $view;
|
|
$this->view = $view;
|
|
|
|
|