src/Entity/Formations.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FormationsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassFormationsRepository::class)]
  6. #[ORM\Table(name"formations")]
  7. class Formations
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     // Relation avec une table Theme (si elle existe)
  14.     #[ORM\ManyToOne]
  15.     #[ORM\JoinColumn(name"theme_id"referencedColumnName"id"nullabletrue)]
  16.     private ?Themes $theme null;
  17.     // Relation avec table Ville (si elle existe)
  18.     #[ORM\ManyToOne]
  19.     #[ORM\JoinColumn(name"ville_id"referencedColumnName"id"nullabletrue)]
  20.     private ?Villes $ville null;
  21.     #[ORM\Column(type"string"nullabletrue)]
  22.     private ?string $dates_session null;
  23.     #[ORM\Column(type"decimal"precision10scale2nullabletrue)]
  24.     private ?string $prix null;
  25.     #[ORM\Column(length10nullabletrueoptions: ['default' => 'EUR'])]
  26.     private ?string $devise 'EUR';
  27.     #[ORM\Column(type"datetime"nullabletrueoptions: ['default' => 'CURRENT_TIMESTAMP'])]
  28.     private ?\DateTimeInterface $created_at null;
  29.     public function __construct()
  30.     {
  31.         $this->created_at = new \DateTime();
  32.     }
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     // public function getCatid(): ?Categories { return $this->catid; }
  38.     // public function setCatid(?Categories $catid): static { $this->catid = $catid; return $this; }
  39.     public function getTheme(): ?Themes{return $this->theme;}
  40.     public function setTheme(?Themes $theme): self{$this->theme $theme;return $this;}
  41.     public function getVille(): ?Villes{ return $this->ville;}
  42.     public function setVille(?Villes $ville): self{$this->ville $ville;return $this;}
  43.     public function getDatesSession(): ?String{ return $this->dates_session;}
  44.     public function setDatesSession(?String $dates_session): self $this->dates_session $dates_session;return $this;}
  45.     public function getPrix(): ?string{return $this->prix;}
  46.     public function setPrix(?string $prix): self{$this->prix $prix;return $this;}
  47.     public function getDevise(): ?string{return $this->devise;}
  48.     public function setDevise(?string $devise): self{$this->devise $devise;return $this;}
  49.     public function getCreatedAt(): ?\DateTimeInterface{return $this->created_at;}
  50.     public function setCreatedAt(?\DateTimeInterface $created_at): self {$this->created_at $created_at;return $this;}
  51. }