src/Entity/UsersAmbienti.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UsersAmbientiRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassUsersAmbientiRepository::class)]
  8. class UsersAmbienti
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\ManyToOne(targetEntityUsers::class, inversedBy'usersAmbientis')]
  15.     #[ORM\JoinColumn(nullablefalse)]
  16.     private $user;
  17.     #[ORM\Column(type'string'length255)]
  18.     private $url;
  19.     #[ORM\Column(type'string'length255nullabletrue)]
  20.     private $username;
  21.     #[ORM\Column(type'string'length255nullabletrue)]
  22.     private $password;
  23.     #[ORM\Column(type'string'length255nullabletrue)]
  24.     private $token;
  25.     #[ORM\Column(type'datetime_immutable')]
  26.     private $created_at;
  27.     #[ORM\OneToMany(mappedBy'ambiente'targetEntityQuestionari::class)]
  28.     private $questionaris;
  29.     #[ORM\Column(type'string'length255)]
  30.     private $tipo;
  31.     #[ORM\Column(type'string'length255)]
  32.     private $name;
  33.     #[ORM\Column(type'string'length255nullabletrue)]
  34.     private $iv;
  35.     #[ORM\Column(type'string'length255nullabletrue)]
  36.     private $tag;
  37.     #[ORM\Column(type'string'length255nullabletrue)]
  38.     private $apikey;
  39.     #[ORM\Column(type'string'length255nullabletrue)]
  40.     private $apisecret;
  41.     #[ORM\OneToMany(mappedBy'ambiente'targetEntityQuestionariIniziati::class)]
  42.     private $questionariIniziatis;
  43.     #[ORM\OneToMany(mappedBy'ambiente'targetEntityEstrazioni::class, orphanRemovaltrue)]
  44.     private Collection $estrazionis;
  45.     public function __construct()
  46.     {
  47.         $this->questionaris = new ArrayCollection();
  48.         $this->questionariIniziatis = new ArrayCollection();
  49.         $this->estrazionis = new ArrayCollection();
  50.     }
  51.     public function __toString()
  52.     {
  53.         return $this->url." (".$this->tipo.")";
  54.     }
  55.     public function getId(): ?int
  56.     {
  57.         return $this->id;
  58.     }
  59.     public function getUser(): ?Users
  60.     {
  61.         return $this->user;
  62.     }
  63.     public function setUser(?Users $user): self
  64.     {
  65.         $this->user $user;
  66.         return $this;
  67.     }
  68.     public function getUrl(): ?string
  69.     {
  70.         return $this->url;
  71.     }
  72.     public function setUrl(string $url): self
  73.     {
  74.         $this->url $url;
  75.         return $this;
  76.     }
  77.     public function getUsername(): ?string
  78.     {
  79.         return $this->username;
  80.     }
  81.     public function setUsername(?string $username): self
  82.     {
  83.         $this->username $username;
  84.         return $this;
  85.     }
  86.     public function getPassword(): ?string
  87.     {
  88.         return $this->password;
  89.     }
  90.     public function setPassword(?string $password): self
  91.     {
  92.         $this->password $password;
  93.         return $this;
  94.     }
  95.     public function getToken(): ?string
  96.     {
  97.         return $this->token;
  98.     }
  99.     public function setToken(?string $token): self
  100.     {
  101.         $this->token $token;
  102.         return $this;
  103.     }
  104.     public function getCreatedAt(): ?\DateTimeImmutable
  105.     {
  106.         return $this->created_at;
  107.     }
  108.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  109.     {
  110.         $this->created_at $created_at;
  111.         return $this;
  112.     }
  113.     /**
  114.      * @return Collection<int, Questionari>
  115.      */
  116.     public function getQuestionaris(): Collection
  117.     {
  118.         return $this->questionaris;
  119.     }
  120.     public function addQuestionari(Questionari $questionari): self
  121.     {
  122.         if (!$this->questionaris->contains($questionari)) {
  123.             $this->questionaris[] = $questionari;
  124.             $questionari->setAmbiente($this);
  125.         }
  126.         return $this;
  127.     }
  128.     public function removeQuestionari(Questionari $questionari): self
  129.     {
  130.         if ($this->questionaris->removeElement($questionari)) {
  131.             // set the owning side to null (unless already changed)
  132.             if ($questionari->getAmbiente() === $this) {
  133.                 $questionari->setAmbiente(null);
  134.             }
  135.         }
  136.         return $this;
  137.     }
  138.     public function getTipo(): ?string
  139.     {
  140.         return $this->tipo;
  141.     }
  142.     public function setTipo(string $tipo): self
  143.     {
  144.         $this->tipo $tipo;
  145.         return $this;
  146.     }
  147.     public function getName(): ?string
  148.     {
  149.         return $this->name;
  150.     }
  151.     public function setName(string $name): self
  152.     {
  153.         $this->name $name;
  154.         return $this;
  155.     }
  156.     public function getIv(): ?string
  157.     {
  158.         return $this->iv;
  159.     }
  160.     public function setIv(?string $iv): self
  161.     {
  162.         $this->iv $iv;
  163.         return $this;
  164.     }
  165.     public function getTag(): ?string
  166.     {
  167.         return $this->tag;
  168.     }
  169.     public function setTag(?string $tag): self
  170.     {
  171.         $this->tag $tag;
  172.         return $this;
  173.     }
  174.     public function getApikey(): ?string
  175.     {
  176.         return $this->apikey;
  177.     }
  178.     public function setApikey(?string $apikey): self
  179.     {
  180.         $this->apikey $apikey;
  181.         return $this;
  182.     }
  183.     public function getApisecret(): ?string
  184.     {
  185.         return $this->apisecret;
  186.     }
  187.     public function setApisecret(?string $apisecret): self
  188.     {
  189.         $this->apisecret $apisecret;
  190.         return $this;
  191.     }
  192.     /**
  193.      * @return Collection<int, QuestionariIniziati>
  194.      */
  195.     public function getQuestionariIniziatis(): Collection
  196.     {
  197.         return $this->questionariIniziatis;
  198.     }
  199.     public function addQuestionariIniziati(QuestionariIniziati $questionariIniziati): self
  200.     {
  201.         if (!$this->questionariIniziatis->contains($questionariIniziati)) {
  202.             $this->questionariIniziatis[] = $questionariIniziati;
  203.             $questionariIniziati->setAmbiente($this);
  204.         }
  205.         return $this;
  206.     }
  207.     public function removeQuestionariIniziati(QuestionariIniziati $questionariIniziati): self
  208.     {
  209.         if ($this->questionariIniziatis->removeElement($questionariIniziati)) {
  210.             // set the owning side to null (unless already changed)
  211.             if ($questionariIniziati->getAmbiente() === $this) {
  212.                 $questionariIniziati->setAmbiente(null);
  213.             }
  214.         }
  215.         return $this;
  216.     }
  217.     /**
  218.      * @return Collection<int, Estrazioni>
  219.      */
  220.     public function getEstrazionis(): Collection
  221.     {
  222.         return $this->estrazionis;
  223.     }
  224.     public function addEstrazioni(Estrazioni $estrazioni): static
  225.     {
  226.         if (!$this->estrazionis->contains($estrazioni)) {
  227.             $this->estrazionis->add($estrazioni);
  228.             $estrazioni->setAmbiente($this);
  229.         }
  230.         return $this;
  231.     }
  232.     public function removeEstrazioni(Estrazioni $estrazioni): static
  233.     {
  234.         if ($this->estrazionis->removeElement($estrazioni)) {
  235.             // set the owning side to null (unless already changed)
  236.             if ($estrazioni->getAmbiente() === $this) {
  237.                 $estrazioni->setAmbiente(null);
  238.             }
  239.         }
  240.         return $this;
  241.     }
  242. }