caisse-bliss/nope/Entity/SerieFestival.php

179 lines
3.1 KiB
PHP
Raw Permalink Normal View History

2018-08-22 16:42:21 +02:00
<?php
2023-06-20 19:14:19 +02:00
namespace App\Entity;
2018-08-22 16:42:21 +02:00
2023-06-20 19:14:19 +02:00
use App\Traits\Commentable;
2018-08-22 16:42:21 +02:00
use Doctrine\ORM\Mapping as ORM;
/**
* Festival
*
* @ORM\Table(name="serieFestival")
2023-06-20 19:14:19 +02:00
* @ORM\Entity(repositoryClass="App\Repository\FestivalRepository")
2018-08-22 16:42:21 +02:00
*/
class SerieFestival {
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=255)
*/
private $name;
/**
* variabilised products sold
2023-06-20 19:14:19 +02:00
* @ORM\OneToMany(targetEntity="App\Entity\Festival", mappedBy="serieFestival")
2018-08-22 16:42:21 +02:00
*/
private $festivals;
/**
* @var \DateTime
*
* @ORM\Column(name="dateCreation", type="datetime")
*/
private $dateCreation;
2018-08-27 14:58:45 +02:00
/**
2023-06-20 19:14:19 +02:00
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="seriesFestivals")
2018-08-27 14:58:45 +02:00
*/
private $user;
2023-06-28 16:16:11 +02:00
#[ORM\ManyToOne(inversedBy: 'serieFestivals')]
private ?Admin $admin = null;
2018-08-27 14:58:45 +02:00
/**
* @return mixed
*/
public function getUser()
{
return $this->user;
}
/**
* @param mixed $user
*/
public function setUser($user)
{
$this->user = $user;
}
2018-08-22 16:42:21 +02:00
/**
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @param int $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return mixed
*/
public function getFestivals()
{
return $this->festivals;
}
/**
* @param mixed $festivals
*/
public function setFestivals($festivals)
{
$this->festivals = $festivals;
}
/**
* @return \DateTime
*/
public function getDateCreation()
{
return $this->dateCreation;
}
/**
* @param \DateTime $dateCreation
*/
public function setDateCreation($dateCreation)
{
$this->dateCreation = $dateCreation;
}
2019-07-05 16:41:33 +02:00
/**
* Constructor
*/
public function __construct()
{
$this->festivals = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Add festival.
*
2023-06-20 19:14:19 +02:00
* @param \App\Entity\Festival $festival
2019-07-05 16:41:33 +02:00
*
* @return SerieFestival
*/
2023-06-20 19:14:19 +02:00
public function addFestival(\App\Entity\Festival $festival)
2019-07-05 16:41:33 +02:00
{
$this->festivals[] = $festival;
return $this;
}
/**
* Remove festival.
*
2023-06-20 19:14:19 +02:00
* @param \App\Entity\Festival $festival
2019-07-05 16:41:33 +02:00
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
2023-06-20 19:14:19 +02:00
public function removeFestival(\App\Entity\Festival $festival)
2019-07-05 16:41:33 +02:00
{
return $this->festivals->removeElement($festival);
}
2023-06-28 16:16:11 +02:00
public function getAdmin(): ?Admin
{
return $this->admin;
}
public function setAdmin(?Admin $admin): static
{
$this->admin = $admin;
return $this;
}
2019-07-04 17:51:14 +02:00
}