src/Entity/Themeshanghai.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ThemeshanghaiRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  6. #[ORM\Entity(repositoryClassThemeshanghaiRepository::class)]
  7. #[ORM\Table(name"themeshanghai")]
  8. #[UniqueEntity(
  9.     fields: ['theme''ville''session''prix''devise'],
  10.     message'Cette formation est déjà enrégistrée'
  11. )]
  12. class Themeshanghai
  13. {
  14.     #[ORM\Id]
  15.     #[ORM\GeneratedValue]
  16.     #[ORM\Column]
  17.     private ?int $id null;
  18.     // Relation avec une table Themeshanghai (si elle existe)
  19.     #[ORM\Column(type"string"nullabletrue)]
  20.     private ?string $theme null;
  21.     
  22.     #[ORM\Column(type"string"nullabletrue)]
  23.     private ?string $slug null;
  24.     #[ORM\Column(type"string"nullablefalseoptions: ['default' => 'shanghai'])]
  25.     private ?string $ville null;
  26.     #[ORM\Column(type"string"nullabletrue)]
  27.     private ?string $session null;
  28.     #[ORM\Column(type"string"nullabletrue)]
  29.     private ?string $prix null;
  30.     #[ORM\Column(length10nullablefalseoptions: ['default' => 'EURO'])]
  31.     private ?string $devise 'EURO';
  32.     
  33.     #[ORM\Column(length10)]
  34.     private ?int $adminsid;
  35.     #[ORM\Column(type"datetime"nullabletrueoptions: ['default' => 'CURRENT_TIMESTAMP'])]
  36.     private ?\DateTimeInterface $createdat null;
  37.     #[ORM\Column(type"datetime"nullabletrueoptions: ['default' => 'CURRENT_TIMESTAMP'])]
  38.     private ?\DateTimeInterface $updatedat null;
  39.     
  40.     public function __construct()
  41.     {
  42.         $this->createdat = new \DateTime();
  43.         $this->updatedat = new \DateTime();
  44.     }
  45.     public function getId(): ?int{return $this->id;}
  46.     // public function getCatid(): ?Categories { return $this->catid; }
  47.     // public function setCatid(?Categories $catid): static { $this->catid = $catid; return $this; }
  48.     public function getTheme(): ?String{return $this->theme;}
  49.     public function setTheme(?String $theme): self{$this->theme $theme;return $this;}
  50.     public function getSlug(): ?String{return $this->slug;}
  51.     public function setSlug(?String $slug): self{$this->slug $slug;return $this;}
  52.     public function getVille(): ?String{ return $this->ville;}
  53.     public function setVille(?String $ville): self{$this->ville $ville;return $this;}
  54.     public function getSession(): ?String{ return $this->session;}
  55.     public function setSession(?String $session): self $this->session $session;return $this;}
  56.     public function getPrix(): ?string{return $this->prix;}
  57.     public function setPrix(?string $prix): self{$this->prix $prix;return $this;}
  58.     public function getDevise(): ?string{return $this->devise;}
  59.     public function setDevise(?string $devise): self{$this->devise $devise;return $this;}
  60.     public function getAdminsId(): ?int{return $this->adminsid;}
  61.     public function setAdminsId(int $adminsid): static{$this->adminsid $adminsid;return $this;}
  62.     public function getCreatedAt(): ?\DateTimeInterface{return $this->createdat;}
  63.     public function setCreatedAt(?\DateTimeInterface $createdat): self {$this->createdat $createdat;return $this;}
  64.     
  65.     public function getUpdatedAt(): ?\DateTimeInterface{return $this->updatedat;}
  66.     public function setUpdatedAt(?\DateTimeInterface $updatedat): self {$this->updatedat $updatedat;return $this;}
  67. }