<?php
namespace TheatreCore\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* News
*
* @ORM\Table(name="news", indexes={@ORM\Index(name="idregion", columns={"idregion"}), @ORM\Index(name="type_news", columns={"type_news"}), @ORM\Index(name="publish", columns={"publish"}), @ORM\Index(name="zip", columns={"zip"}), @ORM\Index(name="idextranetuser", columns={"idextranetuser"}), @ORM\Index(name="country", columns={"country"}), @ORM\Index(name="valid", columns={"valid"})})
* @ORM\Entity(repositoryClass="TheatreCore\Repository\NewsRepository")
*/
class News
{
/**
* @var int
*
* @ORM\Column(name="idnew", type="integer", nullable=false, options={"unsigned"=true})
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $idnew;
/**
* @var string|null
*
* @ORM\Column(name="title", type="string", length=255, nullable=true)
*/
private $title;
/**
* @var bool
*
* @ORM\Column(name="type_news", type="boolean", nullable=false)
*/
private $typeNews = false;
/**
* @var string|null
*
* @ORM\Column(name="description", type="text", length=65535, nullable=true)
*/
private $description;
/**
* @var bool|null
*
* @ORM\Column(name="markdown", type="boolean", nullable=true)
*/
private $markdown = false;
/**
* @var \DateTime|null
*
* @ORM\Column(name="date_start", type="datetime", nullable=true, options={"default"="0000-00-00 00:00:00"})
*/
private $dateStart = '0000-00-00 00:00:00';
/**
* @var \DateTime|null
*
* @ORM\Column(name="date_end", type="datetime", nullable=true)
*/
private $dateEnd;
/**
* @var string|null
*
* @ORM\Column(name="hour", type="string", length=5, nullable=true)
*/
private $hour;
/**
* @var string|null
*
* @ORM\Column(name="location", type="string", length=255, nullable=true)
*/
private $location;
/**
* @var string|null
*
* @ORM\Column(name="city", type="string", length=255, nullable=true)
*/
private $city;
/**
* @var string|null
*
* @ORM\Column(name="zip", type="string", length=20, nullable=true)
*/
private $zip;
/**
* @var string|null
*
* @ORM\Column(name="contacts", type="string", length=255, nullable=true)
*/
private $contacts;
/**
* @var string|null
*
* @ORM\Column(name="url", type="string", length=255, nullable=true)
*/
private $url;
/**
* @var string|null
*
* @ORM\Column(name="url_more", type="string", length=255, nullable=true)
*/
private $urlMore;
/**
* @var string|null
*
* @ORM\Column(name="infos_contacts", type="text", length=65535, nullable=true)
*/
private $infosContacts;
/**
* @var string|null
*
* @ORM\Column(name="url_file", type="string", length=255, nullable=true)
*/
private $urlFile;
/**
* @var string|null
*
* @ORM\Column(name="copyright_file", type="string", length=255, nullable=true)
*/
private $copyrightFile;
/**
* @var bool|null
*
* @ORM\Column(name="is_homepage", type="boolean", nullable=true)
*/
private $isHomepage = false;
/**
* @var bool
*
* @ORM\Column(name="publish", type="boolean", nullable=false)
*/
private $publish = false;
/**
* @var bool
*
* @ORM\Column(name="valid", type="boolean", nullable=false)
*/
private $valid = false;
/**
* @var bool
*
* @ORM\Column(name="statut", type="boolean", nullable=false)
*/
private $statut = false;
/**
* @var \DateTime
*
* @ORM\Column(name="dateinsert", type="datetime", nullable=false, options={"default"="0000-00-00 00:00:00"})
*/
private $dateinsert = '0000-00-00 00:00:00';
/**
* @var \DateTime|null
*
* @ORM\Column(name="dateupdate", type="datetime", nullable=true, options={"default"="0000-00-00 00:00:00"})
*/
private $dateupdate = '0000-00-00 00:00:00';
/**
* @var int|null
*
* @ORM\Column(name="idextranetuser_lock", type="integer", nullable=true)
*/
private $idextranetuserLock;
/**
* @var \Extranetusers
*
* @ORM\ManyToOne(targetEntity="Extranetusers")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="idextranetuser", referencedColumnName="idextranetuser")
* })
*/
private $idextranetuser;
/**
* @var \Regions
*
* @ORM\ManyToOne(targetEntity="Regions")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="idregion", referencedColumnName="idregion")
* })
*/
private $idregion;
/**
* @var \Countries
*
* @ORM\ManyToOne(targetEntity="Countries")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="country", referencedColumnName="id")
* })
*/
private $country;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Contacts", inversedBy="idnew")
* @ORM\JoinTable(name="new_contact",
* joinColumns={
* @ORM\JoinColumn(name="idnew", referencedColumnName="idnew")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="idcontact", referencedColumnName="idcontact")
* }
* )
*/
private $idcontact;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Persons", inversedBy="idnew")
* @ORM\JoinTable(name="new_person",
* joinColumns={
* @ORM\JoinColumn(name="idnew", referencedColumnName="idnew")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="idperson", referencedColumnName="idperson")
* }
* )
*/
private $idperson;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Spectacles", inversedBy="idnew")
* @ORM\JoinTable(name="new_spectacle",
* joinColumns={
* @ORM\JoinColumn(name="idnew", referencedColumnName="idnew")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="idspectacle", referencedColumnName="idspectacle")
* }
* )
*/
private $idspectacle;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Texts", inversedBy="idnew")
* @ORM\JoinTable(name="new_text",
* joinColumns={
* @ORM\JoinColumn(name="idnew", referencedColumnName="idnew")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="idtext", referencedColumnName="idtext")
* }
* )
*/
private $idtext;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\OneToMany(targetEntity="Newschedules", mappedBy="idnew")
*
*/
private $schedules;
/**
* Constructor
*/
public function __construct()
{
$this->idcontact = new \Doctrine\Common\Collections\ArrayCollection();
$this->idperson = new \Doctrine\Common\Collections\ArrayCollection();
$this->idspectacle = new \Doctrine\Common\Collections\ArrayCollection();
$this->idtext = new \Doctrine\Common\Collections\ArrayCollection();
$this->schedules = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get idnew.
*
* @return int
*/
public function getIdnew()
{
return $this->idnew;
}
/**
* Set title.
*
* @param string|null $title
*
* @return News
*/
public function setTitle($title = null)
{
$this->title = $title;
return $this;
}
/**
* Get title.
*
* @return string|null
*/
public function getTitle()
{
return $this->title;
}
/**
* Set typeNews.
*
* @param bool $typeNews
*
* @return News
*/
public function setTypeNews($typeNews)
{
$this->typeNews = $typeNews;
return $this;
}
/**
* Get typeNews.
*
* @return bool
*/
public function getTypeNews()
{
return $this->typeNews;
}
/**
* Set description.
*
* @param string|null $description
*
* @return News
*/
public function setDescription($description = null)
{
$this->description = $description;
return $this;
}
/**
* Get description.
*
* @return string|null
*/
public function getDescription()
{
return $this->description;
}
/**
* Set markdown.
*
* @param bool|null $markdown
*
* @return News
*/
public function setMarkdown($markdown = null)
{
$this->markdown = $markdown;
return $this;
}
/**
* Get markdown.
*
* @return bool|null
*/
public function getMarkdown()
{
return $this->markdown;
}
/**
* Set dateStart.
*
* @param \DateTime|null $dateStart
*
* @return News
*/
public function setDateStart($dateStart = null)
{
$this->dateStart = $dateStart;
return $this;
}
/**
* Get dateStart.
*
* @return \DateTime|null
*/
public function getDateStart()
{
return $this->dateStart;
}
/**
* Set dateEnd.
*
* @param \DateTime|null $dateEnd
*
* @return News
*/
public function setDateEnd($dateEnd = null)
{
$this->dateEnd = $dateEnd;
return $this;
}
/**
* Get dateEnd.
*
* @return \DateTime|null
*/
public function getDateEnd()
{
return $this->dateEnd;
}
/**
* Set hour.
*
* @param string|null $hour
*
* @return News
*/
public function setHour($hour = null)
{
$this->hour = $hour;
return $this;
}
/**
* Get hour.
*
* @return string|null
*/
public function getHour()
{
return $this->hour;
}
/**
* Set location.
*
* @param string|null $location
*
* @return News
*/
public function setLocation($location = null)
{
$this->location = $location;
return $this;
}
/**
* Get location.
*
* @return string|null
*/
public function getLocation()
{
return $this->location;
}
/**
* Set city.
*
* @param string|null $city
*
* @return News
*/
public function setCity($city = null)
{
$this->city = $city;
return $this;
}
/**
* Get city.
*
* @return string|null
*/
public function getCity()
{
return $this->city;
}
/**
* Set zip.
*
* @param string|null $zip
*
* @return News
*/
public function setZip($zip = null)
{
$this->zip = $zip;
return $this;
}
/**
* Get zip.
*
* @return string|null
*/
public function getZip()
{
return $this->zip;
}
/**
* Set contacts.
*
* @param string|null $contacts
*
* @return News
*/
public function setContacts($contacts = null)
{
$this->contacts = $contacts;
return $this;
}
/**
* Get contacts.
*
* @return string|null
*/
public function getContacts()
{
return $this->contacts;
}
/**
* Set url.
*
* @param string|null $url
*
* @return News
*/
public function setUrl($url = null)
{
$this->url = $url;
return $this;
}
/**
* Get url.
*
* @return string|null
*/
public function getUrl()
{
return $this->url;
}
/**
* Set urlMore.
*
* @param string|null $urlMore
*
* @return News
*/
public function setUrlMore($urlMore = null)
{
$this->urlMore = $urlMore;
return $this;
}
/**
* Get urlMore.
*
* @return string|null
*/
public function getUrlMore()
{
return $this->urlMore;
}
/**
* Set infosContacts.
*
* @param string|null $infosContacts
*
* @return News
*/
public function setInfosContacts($infosContacts = null)
{
$this->infosContacts = $infosContacts;
return $this;
}
/**
* Get infosContacts.
*
* @return string|null
*/
public function getInfosContacts()
{
return $this->infosContacts;
}
/**
* Set urlFile.
*
* @param string|null $urlFile
*
* @return News
*/
public function setUrlFile($urlFile = null)
{
$this->urlFile = $urlFile;
return $this;
}
/**
* Get urlFile.
*
* @return string|null
*/
public function getUrlFile()
{
return $this->urlFile;
}
/**
* Set copyrightFile.
*
* @param string|null $copyrightFile
*
* @return News
*/
public function setCopyrightFile($copyrightFile = null)
{
$this->copyrightFile = $copyrightFile;
return $this;
}
/**
* Get copyrightFile.
*
* @return string|null
*/
public function getCopyrightFile()
{
return $this->copyrightFile;
}
/**
* Set isHomepage.
*
* @param bool|null $isHomepage
*
* @return News
*/
public function setIsHomepage($isHomepage = null)
{
$this->isHomepage = $isHomepage;
return $this;
}
/**
* Get isHomepage.
*
* @return bool|null
*/
public function getIsHomepage()
{
return $this->isHomepage;
}
/**
* Set publish.
*
* @param bool $publish
*
* @return News
*/
public function setPublish($publish)
{
$this->publish = $publish;
return $this;
}
/**
* Get publish.
*
* @return bool
*/
public function getPublish()
{
return $this->publish;
}
/**
* Set valid.
*
* @param bool $valid
*
* @return News
*/
public function setValid($valid)
{
$this->valid = $valid;
return $this;
}
/**
* Get valid.
*
* @return bool
*/
public function getValid()
{
return $this->valid;
}
/**
* Set statut.
*
* @param bool $statut
*
* @return News
*/
public function setStatut($statut)
{
$this->statut = $statut;
return $this;
}
/**
* Get statut.
*
* @return bool
*/
public function getStatut()
{
return $this->statut;
}
/**
* Set dateinsert.
*
* @param \DateTime $dateinsert
*
* @return News
*/
public function setDateinsert($dateinsert)
{
$this->dateinsert = $dateinsert;
return $this;
}
/**
* Get dateinsert.
*
* @return \DateTime
*/
public function getDateinsert()
{
return $this->dateinsert;
}
/**
* Set dateupdate.
*
* @param \DateTime|null $dateupdate
*
* @return News
*/
public function setDateupdate($dateupdate = null)
{
$this->dateupdate = $dateupdate;
return $this;
}
/**
* Get dateupdate.
*
* @return \DateTime|null
*/
public function getDateupdate()
{
return $this->dateupdate;
}
/**
* Set idextranetuserLock.
*
* @param int|null $idextranetuserLock
*
* @return News
*/
public function setIdextranetuserLock($idextranetuserLock = null)
{
$this->idextranetuserLock = $idextranetuserLock;
return $this;
}
/**
* Get idextranetuserLock.
*
* @return int|null
*/
public function getIdextranetuserLock()
{
return $this->idextranetuserLock;
}
/**
* Set idextranetuser.
*
* @param \Extranetusers|null $idextranetuser
*
* @return News
*/
public function setIdextranetuser(Extranetusers $idextranetuser = null)
{
$this->idextranetuser = $idextranetuser;
return $this;
}
/**
* Get idextranetuser.
*
* @return \Extranetusers|null
*/
public function getIdextranetuser()
{
return $this->idextranetuser;
}
/**
* Set idregion.
*
* @param \Regions|null $idregion
*
* @return News
*/
public function setIdregion(Regions $idregion = null)
{
$this->idregion = $idregion;
return $this;
}
/**
* Get idregion.
*
* @return \Regions|null
*/
public function getIdregion()
{
return $this->idregion;
}
/**
* Set country.
*
* @param \Countries|null $country
*
* @return News
*/
public function setCountry(Countries $country = null)
{
$this->country = $country;
return $this;
}
/**
* Get country.
*
* @return \Countries|null
*/
public function getCountry()
{
return $this->country;
}
/**
* Add idcontact.
*
* @param \Contacts $idcontact
*
* @return News
*/
public function addIdcontact(Contacts $idcontact)
{
$this->idcontact[] = $idcontact;
return $this;
}
/**
* Remove idcontact.
*
* @param \Contacts $idcontact
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeIdcontact(Contacts $idcontact)
{
return $this->idcontact->removeElement($idcontact);
}
/**
* Get idcontact.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getIdcontact()
{
return $this->idcontact;
}
/**
* Add idperson.
*
* @param \Persons $idperson
*
* @return News
*/
public function addIdperson(Persons $idperson)
{
$this->idperson[] = $idperson;
return $this;
}
/**
* Remove idperson.
*
* @param \Persons $idperson
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeIdperson(Persons $idperson)
{
return $this->idperson->removeElement($idperson);
}
/**
* Get idperson.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getIdperson()
{
return $this->idperson;
}
/**
* Add idspectacle.
*
* @param \Spectacles $idspectacle
*
* @return News
*/
public function addIdspectacle(Persons $idspectacle)
{
$this->idspectacle[] = $idspectacle;
return $this;
}
/**
* Remove idspectacle.
*
* @param \Spectacles $idspectacle
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeIdspectacle(Persons $idspectacle)
{
return $this->idspectacle->removeElement($idspectacle);
}
/**
* Get idspectacle.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getIdspectacle()
{
return $this->idspectacle;
}
//début
/**
* Add idtext.
*
* @param \Texts $idtext
*
* @return News
*/
public function addIdtext(Persons $idtext)
{
$this->idtext[] = $idtext;
return $this;
}
/**
* Remove idtext.
*
* @param \Texts $idtext
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeIdtext(Persons $idtext)
{
return $this->idtext->removeElement($idtext);
}
/**
* Get idtext.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getIdtext()
{
return $this->idtext;
}
//fin
/**
* Add idperson.
*
* @param \Schedules $idperson
*
* @return News
*/
public function addSchedules(Schedules $schedules)
{
$this->schedules[] = $schedules;
return $this;
}
/**
* Remove schedules.
*
* @param \Schedules $schedules
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeSchedules(Schedules $schedules)
{
return $this->schedules->removeElement($schedules);
}
/**
* Get schedules.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getSchedules()
{
return $this->schedules;
}
}