src/Entity/EventFacility.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Business\FacilityContract;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\SoftDeleteable\Traits\SoftDeleteableEntity;
  6. /**
  7.  * To use in many templates
  8.  *
  9.  * @ORM\Entity
  10.  * @ORM\Entity(repositoryClass="App\Repository\EventFacilityRepository")
  11.  */
  12. class EventFacility implements FacilityContract
  13. {
  14.     use \Gedmo\Timestampable\Traits\TimestampableEntity;
  15.     use BlameableEntity;
  16.     use SoftDeleteableEntity;
  17.     /**
  18.      * @var int
  19.      *
  20.      * @ORM\Column(name="id", type="integer")
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue(strategy="AUTO")
  23.      */
  24.     public $id;
  25.     /**
  26.      * FROM NEOS ( id)
  27.      *
  28.      * @var string
  29.      * @ORM\Column(name="neosId",type="string", length=50)
  30.      */
  31.     private $neosId;
  32.     /**
  33.      * FROM NEOS (code)
  34.      *
  35.      * @var string
  36.      * @ORM\Column(name="code",type="string", length=50)
  37.      */
  38.     private $code;
  39.     /**
  40.      * FROM NEOS (name)
  41.      *
  42.      * @var string
  43.      * @ORM\Column(name="name",type="string", length=128)
  44.      */
  45.     private $name;
  46.     /**
  47.      * @var string
  48.      * @ORM\Column(name="text", type="text",nullable=true)
  49.      */
  50.     private $text;
  51.     /**
  52.      * @ORM\ManyToOne(targetEntity="App\Entity\Node", inversedBy="facilities")
  53.      * @ORM\JoinColumn(name="event_node_id", referencedColumnName="id")
  54.      */
  55.     private $eventNode;
  56.     /**
  57.      * @return mixed
  58.      */
  59.     public function getNeosId(): ?string
  60.     {
  61.         return $this->neosId;
  62.     }
  63.     /**
  64.      * @param mixed $neosId
  65.      */
  66.     public function setNeosId($neosId)
  67.     {
  68.         $this->neosId $neosId;
  69.     }
  70.     /**
  71.      * @return mixed
  72.      */
  73.     public function getEventNode()
  74.     {
  75.         return $this->eventNode;
  76.     }
  77.     /**
  78.      * @param mixed $eventNode
  79.      */
  80.     public function setEventNode($eventNode)
  81.     {
  82.         $this->eventNode $eventNode;
  83.     }
  84.     /**
  85.      * @return mixed
  86.      */
  87.     public function getCode(): string
  88.     {
  89.         return $this->code;
  90.     }
  91.     /**
  92.      * @param mixed $code
  93.      */
  94.     public function setCode($code)
  95.     {
  96.         $this->code $code;
  97.     }
  98.     /**
  99.      * @return int
  100.      */
  101.     public function getId()
  102.     {
  103.         return $this->id;
  104.     }
  105.     public function toString(): string
  106.     {
  107.         return $this->getName() . " {id=" $this->id "}";
  108.     }
  109.     /**
  110.      * @return mixed
  111.      */
  112.     public function getName(): ?string
  113.     {
  114.         return $this->name;
  115.     }
  116.     /**
  117.      * @param mixed $name
  118.      */
  119.     public function setName($name)
  120.     {
  121.         $this->name $name;
  122.     }
  123.     public function __toString()
  124.     {
  125.         return (string)$this->text;
  126.     }
  127.     /**
  128.      * Get text
  129.      *
  130.      * @return string
  131.      */
  132.     public function getText()
  133.     {
  134.         return $this->text;
  135.     }
  136.     /**
  137.      * Set text
  138.      *
  139.      * @param string $text
  140.      * @return EventFacility
  141.      */
  142.     public function setText($text)
  143.     {
  144.         $this->text $text;
  145.         return $this;
  146.     }
  147. }