src/Entity/Gos/Uniqskills/VoucherElement.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos\Uniqskills;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\Gos\Uniqskills\VoucherElementRepository")
  6.  * @ORM\HasLifecycleCallbacks()
  7.  */
  8. class VoucherElement
  9. {
  10.     /**
  11.      * @ORM\Id()
  12.      * @ORM\GeneratedValue()
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="string", length=255)
  18.      */
  19.     private $name;
  20.     /**
  21.      * @ORM\Column(type="integer")
  22.      */
  23.     private $x;
  24.     /**
  25.      * @ORM\Column(type="integer")
  26.      */
  27.     private $y;
  28.     /**
  29.      * @ORM\Column(type="integer")
  30.      */
  31.     private $width;
  32.     /**
  33.      * @ORM\Column(type="integer")
  34.      */
  35.     private $height;
  36.     /**
  37.      * @ORM\Column(type="integer")
  38.      */
  39.     private $fontSize;
  40.     /**
  41.      * @ORM\Column(type="boolean", nullable=true)
  42.      */
  43.     private $isImage;
  44.     /**
  45.      * @ORM\Column(type="boolean", nullable=true)
  46.      */
  47.     private $textCentered;
  48.     /**
  49.      * @ORM\Column(type="boolean", nullable=true)
  50.      */
  51.     private $textJustified;
  52.     /**
  53.      * @ORM\Column(type="string", length=255)
  54.      */
  55.     private $value;
  56.     /**
  57.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\Uniqskills\Voucher", inversedBy="voucherElements")
  58.      * @ORM\JoinColumn(referencedColumnName="id", onDelete="cascade")
  59.      */
  60.     private $voucher;
  61.     /**
  62.      * @ORM\Column(type="datetime")
  63.      */
  64.     private $createdAt;
  65.     /**
  66.      * @ORM\Column(type="datetime", nullable=true)
  67.      */
  68.     private $updatedAt;
  69.     /** @ORM\PrePersist() */
  70.     public function prePersist()
  71.     {
  72.         $this->createdAt = new \DateTime();
  73.     }
  74.     /** @ORM\PreUpdate() */
  75.     public function preUpdate()
  76.     {
  77.         $this->updatedAt = new \DateTime();
  78.     }
  79.     public function __toString()
  80.     {
  81.         return (string) $this->name;
  82.     }
  83.     public function getId(): ?int
  84.     {
  85.         return $this->id;
  86.     }
  87.     public function getName(): ?string
  88.     {
  89.         return $this->name;
  90.     }
  91.     public function setName(string $name): self
  92.     {
  93.         $this->name $name;
  94.         return $this;
  95.     }
  96.     public function getX(): ?int
  97.     {
  98.         return $this->x;
  99.     }
  100.     public function setX(int $x): self
  101.     {
  102.         $this->$x;
  103.         return $this;
  104.     }
  105.     public function getY(): ?int
  106.     {
  107.         return $this->y;
  108.     }
  109.     public function setY(int $y): self
  110.     {
  111.         $this->$y;
  112.         return $this;
  113.     }
  114.     public function getWidth(): ?int
  115.     {
  116.         return $this->width;
  117.     }
  118.     public function setWidth(int $width): self
  119.     {
  120.         $this->width $width;
  121.         return $this;
  122.     }
  123.     public function getHeight(): ?int
  124.     {
  125.         return $this->height;
  126.     }
  127.     public function setHeight(int $height): self
  128.     {
  129.         $this->height $height;
  130.         return $this;
  131.     }
  132.     public function getFontSize(): ?int
  133.     {
  134.         return $this->fontSize;
  135.     }
  136.     public function setFontSize(int $fontSize): self
  137.     {
  138.         $this->fontSize $fontSize;
  139.         return $this;
  140.     }
  141.     public function getIsImage(): ?bool
  142.     {
  143.         return $this->isImage;
  144.     }
  145.     public function setIsImage(?bool $isImage): self
  146.     {
  147.         $this->isImage $isImage;
  148.         return $this;
  149.     }
  150.     public function getTextCentered(): ?bool
  151.     {
  152.         return $this->textCentered;
  153.     }
  154.     public function setTextCentered(?bool $textCentered): self
  155.     {
  156.         $this->textCentered $textCentered;
  157.         return $this;
  158.     }
  159.     public function getTextJustified(): ?bool
  160.     {
  161.         return $this->textJustified;
  162.     }
  163.     public function setTextJustified(?bool $textJustified): self
  164.     {
  165.         $this->textJustified $textJustified;
  166.         return $this;
  167.     }
  168.     public function getValue(): ?string
  169.     {
  170.         return $this->value;
  171.     }
  172.     public function setValue(string $value): self
  173.     {
  174.         $this->value $value;
  175.         return $this;
  176.     }
  177.     public function getCreatedAt(): ?\DateTimeInterface
  178.     {
  179.         return $this->createdAt;
  180.     }
  181.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  182.     {
  183.         $this->createdAt $createdAt;
  184.         return $this;
  185.     }
  186.     public function getUpdatedAt(): ?\DateTimeInterface
  187.     {
  188.         return $this->updatedAt;
  189.     }
  190.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  191.     {
  192.         $this->updatedAt $updatedAt;
  193.         return $this;
  194.     }
  195.     public function getVoucher(): ?Voucher
  196.     {
  197.         return $this->voucher;
  198.     }
  199.     public function setVoucher(?Voucher $voucher): self
  200.     {
  201.         $this->voucher $voucher;
  202.         return $this;
  203.     }
  204. }