src/Entity/Main/Activity.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Main;
  3. use App\Repository\ActivityRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ActivityRepository::class)
  9.  */
  10. class Activity
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=64, nullable=true)
  20.      */
  21.     private $code;
  22.     /**
  23.      * @ORM\Column(type="string", length=60, nullable=true)
  24.      */
  25.     private $designation;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $mention;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $mention_anniversaire;
  34.     /**
  35.      * @ORM\Column(type="string", length=255, nullable=true)
  36.      */
  37.     private $url_activity;
  38.     /**
  39.      * @ORM\Column(type="integer", nullable=true)
  40.      */
  41.     private $temps_limite_resa;
  42.     /**
  43.      * @ORM\Column(type="integer", nullable=true)
  44.      */
  45.     private $jauge_mini;
  46.     /**
  47.      * @ORM\Column(type="integer", nullable=true)
  48.      */
  49.     private $jauge_maxi;
  50.     /**
  51.      * @ORM\Column(type="integer", nullable=true)
  52.      */
  53.     private $temps_activite;
  54.     /**
  55.      * @ORM\Column(type="integer", nullable=true)
  56.      */
  57.     private $presence_avant;
  58.     /**
  59.      * @ORM\Column(type="integer", nullable=true)
  60.      */
  61.     private $espaces_jeu;
  62.     /**
  63.      * @ORM\Column(type="boolean")
  64.      */
  65.     private $is_creneau_activity false;
  66.     /**
  67.      * @ORM\Column(type="boolean")
  68.      */
  69.     private $is_tarification_multiple false;
  70.     /**
  71.      * @ORM\Column(type="time", nullable=true)
  72.      */
  73.     private $heure_ouverture_creneau;
  74.     /**
  75.      * @ORM\Column(type="time", nullable=true)
  76.      */
  77.     private $heure_fermeture_creneau;
  78.     /**
  79.      * @ORM\Column(type="integer", nullable=true)
  80.      */
  81.     private $temps_creneau;
  82.     /**
  83.      * @ORM\Column(type="boolean", nullable=true)
  84.      */
  85.     private $creneau_obligatoire;
  86.     /**
  87.      * @ORM\Column(type="boolean", nullable=true)
  88.      */
  89.     private $block_room;
  90.     /**
  91.      * @ORM\Column(type="boolean", nullable=true)
  92.      */
  93.     private $isDraft false;
  94.     /**
  95.      * @var Options[]
  96.      * @ORM\OneToMany(targetEntity=ActivityOptions::class, mappedBy="activity", cascade={"remove"})
  97.      */
  98.     // private $options;
  99.     /**
  100.      * @ORM\OneToMany(targetEntity=OpeningDays::class, mappedBy="activity", orphanRemoval=true, cascade={"persist"})
  101.      */
  102.     private $opening_days;
  103.     /**
  104.      * @ORM\Column(type="string", length=64, nullable=true)
  105.      */
  106.     private $billboard_type;
  107.     
  108.     /**
  109.      * @ORM\Column(type="string", length=64, nullable=true)
  110.      */
  111.     private $billboard_libelle_slot 'place';
  112.     /**
  113.      * @ORM\Column(type="integer", nullable=true)
  114.      */
  115.     private $espaces_jeu_reel;
  116.     /**
  117.      * @ORM\Column(type="integer", nullable=true)
  118.      */
  119.     private $jauge_maxi_reel;
  120.     /**
  121.      * @ORM\Column(type="integer", nullable=true)
  122.      */
  123.     private $temps_creneau_reel;
  124.     /**
  125.      * @ORM\Column(type="time", nullable=true)
  126.      */
  127.     private $ignored_creneau;
  128.     /**
  129.      * @ORM\Column(type="integer", nullable=true)
  130.      */
  131.     private $temps_activite_joueur;
  132.     public function __construct()
  133.     {
  134.         $this->opening_days = new ArrayCollection();
  135.     }
  136.     public function __toString()
  137.     {
  138.         return (string) $this->designation;
  139.     }
  140.     public function getId(): ?int
  141.     {
  142.         return $this->id;
  143.     }
  144.     public function getCode(): ?string
  145.     {
  146.         return $this->code;
  147.     }
  148.     public function setCode(?string $code): self
  149.     {
  150.         $this->code $code;
  151.         return $this;
  152.     }
  153.     public function getDesignation(): ?string
  154.     {
  155.         return $this->designation;
  156.     }
  157.     public function setDesignation(?string $designation): self
  158.     {
  159.         $this->designation $designation;
  160.         return $this;
  161.     }
  162.     public function getMention(): ?string
  163.     {
  164.         return $this->mention;
  165.     }
  166.     public function setMention(?string $mention): self
  167.     {
  168.         $this->mention $mention;
  169.         return $this;
  170.     }
  171.     public function getMentionAnniversaire(): ?string
  172.     {
  173.         return $this->mention_anniversaire;
  174.     }
  175.     public function setMentionAnniversaire(?string $mention_anniversaire): self
  176.     {
  177.         $this->mention_anniversaire $mention_anniversaire;
  178.         return $this;
  179.     }
  180.     public function getUrlActivity(): ?string
  181.     {
  182.         return $this->url_activity;
  183.     }
  184.     public function setUrlActivity(?string $url_activity): self
  185.     {
  186.         $this->url_activity $url_activity;
  187.         return $this;
  188.     }
  189.     public function getTempsLimiteResa(): ?int
  190.     {
  191.         return $this->temps_limite_resa;
  192.     }
  193.     public function setTempsLimiteResa(?int $temps_limite_resa): self
  194.     {
  195.         $this->temps_limite_resa $temps_limite_resa;
  196.         return $this;
  197.     }
  198.     public function getJaugeMini(): ?int
  199.     {
  200.         return $this->jauge_mini;
  201.     }
  202.     public function setJaugeMini(?int $jauge_mini): self
  203.     {
  204.         $this->jauge_mini $jauge_mini;
  205.         return $this;
  206.     }
  207.     public function getJaugeMaxi(): ?int
  208.     {
  209.         return $this->jauge_maxi;
  210.     }
  211.     public function setJaugeMaxi(?int $jauge_maxi): self
  212.     {
  213.         $this->jauge_maxi $jauge_maxi;
  214.         return $this;
  215.     }
  216.     public function getTempsActivite(): ?int
  217.     {
  218.         return $this->temps_activite;
  219.     }
  220.     public function setTempsActivite(?int $temps_activite): self
  221.     {
  222.         $this->temps_activite $temps_activite;
  223.         return $this;
  224.     }
  225.     public function getPresenceAvant(): ?int
  226.     {
  227.         return $this->presence_avant;
  228.     }
  229.     public function setPresenceAvant(?int $presence_avant): self
  230.     {
  231.         $this->presence_avant $presence_avant;
  232.         return $this;
  233.     }
  234.     public function getEspacesJeu(): ?int
  235.     {
  236.         return $this->espaces_jeu;
  237.     }
  238.     public function setEspacesJeu(?int $espaces_jeu): self
  239.     {
  240.         $this->espaces_jeu $espaces_jeu;
  241.         return $this;
  242.     }
  243.     public function getIsCreneauActivity(): ?bool
  244.     {
  245.         return $this->is_creneau_activity;
  246.     }
  247.     public function setIsCreneauActivity(bool $is_creneau_activity): self
  248.     {
  249.         $this->is_creneau_activity $is_creneau_activity;
  250.         return $this;
  251.     }
  252.     public function getIsTarificationMultiple(): ?bool
  253.     {
  254.         return $this->is_tarification_multiple;
  255.     }
  256.     public function setIsTarificationMultiple(bool $is_tarification_multiple): self
  257.     {
  258.         $this->is_tarification_multiple $is_tarification_multiple;
  259.         return $this;
  260.     }
  261.     public function getHeureOuvertureCreneau(): ?\DateTimeInterface
  262.     {
  263.         return $this->heure_ouverture_creneau;
  264.     }
  265.     public function setHeureOuvertureCreneau(?\DateTimeInterface $heure_ouverture_creneau): self
  266.     {
  267.         $this->heure_ouverture_creneau $heure_ouverture_creneau;
  268.         return $this;
  269.     }
  270.     public function getHeureFermetureCreneau(): ?\DateTimeInterface
  271.     {
  272.         return $this->heure_fermeture_creneau;
  273.     }
  274.     public function setHeureFermetureCreneau(?\DateTimeInterface $heure_fermeture_creneau): self
  275.     {
  276.         $this->heure_fermeture_creneau $heure_fermeture_creneau;
  277.         return $this;
  278.     }
  279.     public function getTempsCreneau(): ?int
  280.     {
  281.         return $this->temps_creneau;
  282.     }
  283.     public function setTempsCreneau(?int $temps_creneau): self
  284.     {
  285.         $this->temps_creneau $temps_creneau;
  286.         return $this;
  287.     }
  288.     public function getCreneauObligatoire(): ?bool
  289.     {
  290.         return $this->creneau_obligatoire;
  291.     }
  292.     public function setCreneauObligatoire(?bool $creneau_obligatoire): self
  293.     {
  294.         $this->creneau_obligatoire $creneau_obligatoire;
  295.         return $this;
  296.     }
  297.     public function getBlockRoom(): ?bool
  298.     {
  299.         return $this->block_room;
  300.     }
  301.     public function setBlockRoom(?bool $block_room): self
  302.     {
  303.         $this->block_room $block_room;
  304.         return $this;
  305.     }
  306.     public function getIsDraft(): ?bool
  307.     {
  308.         return $this->isDraft;
  309.     }
  310.     public function setIsDraft(?bool $isDraft): self
  311.     {
  312.         $this->isDraft $isDraft;
  313.         return $this;
  314.     }
  315.     
  316.     // public function getOptions()
  317.     // {
  318.     //     return $this->options;
  319.     // }
  320.     // public function setOptions(\App\Entity\Main\ActivityOptions $options): self
  321.     // {
  322.     //     $this->options = $options;
  323.     //     return $this;
  324.     // }
  325.     /**
  326.      * @return Collection<int, OpeningDays>
  327.      */
  328.     public function getOpeningDays(): Collection
  329.     {
  330.         return $this->opening_days;
  331.     }
  332.     public function addOpeningDay(OpeningDays $openingDay): self
  333.     {
  334.         if (!$this->opening_days->contains($openingDay)) {
  335.             $this->opening_days[] = $openingDay;
  336.             $openingDay->setActivity($this);
  337.         }
  338.         return $this;
  339.     }
  340.     public function removeOpeningDay(OpeningDays $openingDay): self
  341.     {
  342.         if ($this->opening_days->removeElement($openingDay)) {
  343.             // set the owning side to null (unless already changed)
  344.             if ($openingDay->getActivity() === $this) {
  345.                 $openingDay->setActivity(null);
  346.             }
  347.         }
  348.         return $this;
  349.     }
  350.     public function getBillboardType(): ?string
  351.     {
  352.         return $this->billboard_type;
  353.     }
  354.     public function setBillboardType(?string $billboard_type): self
  355.     {
  356.         $this->billboard_type $billboard_type;
  357.         return $this;
  358.     }
  359.     public function getBillboardLibelleSlot(): ?string
  360.     {
  361.         return $this->billboard_libelle_slot;
  362.     }
  363.     public function setBillboardLibelleSlot(?string $billboard_libelle_slot): self
  364.     {
  365.         $this->billboard_libelle_slot $billboard_libelle_slot;
  366.         return $this;
  367.     }
  368.     public function getEspacesJeuReel(): ?int
  369.     {
  370.         return $this->espaces_jeu_reel;
  371.     }
  372.     public function setEspacesJeuReel(?int $espaces_jeu_reel): self
  373.     {
  374.         $this->espaces_jeu_reel $espaces_jeu_reel;
  375.         return $this;
  376.     }
  377.     public function getJaugeMaxiReel(): ?int
  378.     {
  379.         return $this->jauge_maxi_reel;
  380.     }
  381.     public function setJaugeMaxiReel(?int $jauge_maxi_reel): self
  382.     {
  383.         $this->jauge_maxi_reel $jauge_maxi_reel;
  384.         return $this;
  385.     }
  386.     public function getTempsCreneauReel(): ?int
  387.     {
  388.         return $this->temps_creneau_reel;
  389.     }
  390.     public function setTempsCreneauReel(?int $temps_creneau_reel): self
  391.     {
  392.         $this->temps_creneau_reel $temps_creneau_reel;
  393.         return $this;
  394.     }
  395.     public function getIgnoredCreneau(): ?\DateTimeInterface
  396.     {
  397.         return $this->ignored_creneau;
  398.     }
  399.     public function setIgnoredCreneau(?\DateTimeInterface $ignored_creneau): self
  400.     {
  401.         $this->ignored_creneau $ignored_creneau;
  402.         return $this;
  403.     }
  404.     public function getTempsActiviteJoueur(): ?int
  405.     {
  406.         return $this->temps_activite_joueur;
  407.     }
  408.     public function setTempsActiviteJoueur(?int $temps_activite_joueur): self
  409.     {
  410.         $this->temps_activite_joueur $temps_activite_joueur;
  411.         return $this;
  412.     }
  413. }