src/Entity/Adherent/MagasinConsentements.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Adherent;
  3. use App\Repository\Adherent\MagasinConsentementsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassMagasinConsentementsRepository::class)]
  6. class MagasinConsentements
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private int $id;
  12.     #[ORM\Column(type'boolean'nullablefalse)]
  13.     private bool $accept;
  14.     #[ORM\Column(type'datetime_immutable'nullablefalse)]
  15.     private \DateTimeImmutable $updatedAt;
  16.     #[ORM\ManyToOne(inversedBy'consentements')]
  17.     #[ORM\JoinColumn(name'magasin'referencedColumnName'k_adherent'nullablefalse)]
  18.     private Magasin $magasin;
  19.     #[ORM\Column(type'string'length255)]
  20.     private string $type;
  21.     public function __construct()
  22.     {
  23.         $this->updatedAt = new \DateTimeImmutable('now');
  24.         $this->accept false;
  25.     }
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     /**
  31.      * @return bool
  32.      */
  33.     public function isAccept(): bool
  34.     {
  35.         return $this->accept;
  36.     }
  37.     /**
  38.      * @param bool $accept
  39.      */
  40.     public function setAccept(bool $accept): void
  41.     {
  42.         $this->accept $accept;
  43.     }
  44.     /**
  45.      * @return \DateTimeImmutable|null
  46.      */
  47.     public function getUpdatedAt(): ?\DateTimeImmutable
  48.     {
  49.         return $this->updatedAt;
  50.     }
  51.     /**
  52.      * @param \DateTimeImmutable|null $updatedAt
  53.      */
  54.     public function setUpdatedAt(?\DateTimeImmutable $updatedAt): void
  55.     {
  56.         $this->updatedAt $updatedAt;
  57.     }
  58.     /**
  59.      * @return Magasin|null
  60.      */
  61.     public function getMagasin(): ?Magasin
  62.     {
  63.         return $this->magasin;
  64.     }
  65.     /**
  66.      * @param Magasin|null $magasin
  67.      */
  68.     public function setMagasin(?Magasin $magasin): void
  69.     {
  70.         $this->magasin $magasin;
  71.     }
  72.     /**
  73.      * @return string
  74.      */
  75.     public function getType(): string
  76.     {
  77.         return $this->type;
  78.     }
  79.     /**
  80.      * @param string $type
  81.      */
  82.     public function setType(string $type): void
  83.     {
  84.         $this->type $type;
  85.     }
  86. }