src/Entity/Qrcode.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\QrcodeRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Uid\Ulid;
  7. /**
  8.  * Qrcode
  9.  *
  10.  */
  11. #[ORM\Table(name'qrcode')]
  12. #[ORM\Entity(repositoryClassQrcodeRepository::class)]
  13. class Qrcode
  14. {
  15.     #[ORM\Id]
  16.     #[ORM\Column(type'ulid'uniquetrue)]
  17.     #[ORM\GeneratedValue(strategy'CUSTOM')]
  18.     #[ORM\CustomIdGenerator(class: 'doctrine.ulid_generator')]
  19.     private $id;
  20.     /**
  21.      * @var string
  22.      *
  23.      */
  24.     #[ORM\Column(name'url'type'text'nullabletrue)]
  25.     private $url;
  26.     /**
  27.      * @var AccountingFirm
  28.      *
  29.      */
  30.     #[ORM\JoinColumn(name'FK_cabinet'referencedColumnName'id')]
  31.     #[ORM\ManyToOne(targetEntity'AccountingFirm'inversedBy'qrcode')]
  32.     private $accountingFirm;
  33.     #[ORM\ManyToOne(targetEntity'QrcodeCategories'inversedBy'qrcode')]
  34.     private $categories;
  35.     #[ORM\Column(type'string'length255nullabletrue)]
  36.     private $domain;
  37.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'qrcodes')]
  38.     #[ORM\JoinColumn(nullabletrue)]
  39.     private ?User $user null;
  40.     public function getId(): ?Ulid
  41.     {
  42.         return $this->id;
  43.     }
  44.     /**
  45.      * @return AccountingFirm
  46.      */
  47.     public function getAccountingFirm(): ?AccountingFirm
  48.     {
  49.         return $this->accountingFirm;
  50.     }
  51.     /**
  52.      * @param AccountingFirm $accountingFirm
  53.      * @return Qrcode
  54.      */
  55.     public function setAccountingFirm(?AccountingFirm $accountingFirm): Qrcode
  56.     {
  57.         $this->accountingFirm $accountingFirm;
  58.         return $this;
  59.     }
  60.     public function getUrl(): ?string
  61.     {
  62.         return $this->url;
  63.     }
  64.     public function setUrl(?string $url): self
  65.     {
  66.         $this->url $url;
  67.         return $this;
  68.     }
  69.     /**
  70.      * @return QrcodeCategories
  71.      */
  72.     public function getcategories(): ?QrcodeCategories
  73.     {
  74.         return $this->categories;
  75.     }
  76.     /**
  77.      * @param QrcodeCategories $categories
  78.      * @return QrcodeCategories
  79.      */
  80.     public function setcategories(?QrcodeCategories $categories): self
  81.     {
  82.         $this->categories $categories;
  83.         return $this;
  84.     }
  85.     public function getDomain(): ?string
  86.     {
  87.         return $this->domain;
  88.     }
  89.     public function setDomain(string $domain): self
  90.     {
  91.         $this->domain $domain;
  92.         return $this;
  93.     }
  94.     public function getUser(): ?User
  95.     {
  96.         return $this->user;
  97.     }
  98.     public function setUser(?User $user): self
  99.     {
  100.         $this->user $user;
  101.         return $this;
  102.     }
  103. }