src/Entity/UserCode.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserCodeRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassUserCodeRepository::class)]
  7. class UserCode
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length8)]
  14.     private ?string $code null;
  15.     #[ORM\Column]
  16.     private ?bool $actif null;
  17.     #[ORM\Column]
  18.     private ?bool $valid null;
  19.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  20.     private ?\DateTimeInterface $dateEmission null;
  21.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  22.     private ?\DateTimeInterface $dateValid null;
  23.     #[ORM\ManyToOne(inversedBy'userCodes')]
  24.     #[ORM\JoinColumn(nullablefalse)]
  25.     private ?User $utilisateur null;
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getCode(): ?string
  31.     {
  32.         return $this->code;
  33.     }
  34.     public function setCode(string $code): static
  35.     {
  36.         $this->code $code;
  37.         return $this;
  38.     }
  39.     public function isActif(): ?bool
  40.     {
  41.         return $this->actif;
  42.     }
  43.     public function setActif(bool $actif): static
  44.     {
  45.         $this->actif $actif;
  46.         return $this;
  47.     }
  48.     public function isValid(): ?bool
  49.     {
  50.         return $this->valid;
  51.     }
  52.     public function setValid(bool $valid): static
  53.     {
  54.         $this->valid $valid;
  55.         return $this;
  56.     }
  57.     public function getDateEmission(): ?\DateTimeInterface
  58.     {
  59.         return $this->dateEmission;
  60.     }
  61.     public function setDateEmission(\DateTimeInterface $dateEmission): static
  62.     {
  63.         $this->dateEmission $dateEmission;
  64.         return $this;
  65.     }
  66.     public function getDateValid(): ?\DateTimeInterface
  67.     {
  68.         return $this->dateValid;
  69.     }
  70.     public function setDateValid(?\DateTimeInterface $dateValid): static
  71.     {
  72.         $this->dateValid $dateValid;
  73.         return $this;
  74.     }
  75.     public function getUtilisateur(): ?User
  76.     {
  77.         return $this->utilisateur;
  78.     }
  79.     public function setUtilisateur(?User $utilisateur): static
  80.     {
  81.         $this->utilisateur $utilisateur;
  82.         return $this;
  83.     }
  84. }