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.     public function __construct()
  44.     {
  45.         $this->questionaris = new ArrayCollection();
  46.         $this->questionariIniziatis = new ArrayCollection();
  47.     }
  48.     public function __toString()
  49.     {
  50.         return $this->url." (".$this->tipo.")";
  51.     }
  52.     public function getId(): ?int
  53.     {
  54.         return $this->id;
  55.     }
  56.     public function getUser(): ?Users
  57.     {
  58.         return $this->user;
  59.     }
  60.     public function setUser(?Users $user): self
  61.     {
  62.         $this->user $user;
  63.         return $this;
  64.     }
  65.     public function getUrl(): ?string
  66.     {
  67.         return $this->url;
  68.     }
  69.     public function setUrl(string $url): self
  70.     {
  71.         $this->url $url;
  72.         return $this;
  73.     }
  74.     public function getUsername(): ?string
  75.     {
  76.         return $this->username;
  77.     }
  78.     public function setUsername(?string $username): self
  79.     {
  80.         $this->username $username;
  81.         return $this;
  82.     }
  83.     public function getPassword(): ?string
  84.     {
  85.         return $this->password;
  86.     }
  87.     public function setPassword(?string $password): self
  88.     {
  89.         $this->password $password;
  90.         return $this;
  91.     }
  92.     public function getToken(): ?string
  93.     {
  94.         return $this->token;
  95.     }
  96.     public function setToken(?string $token): self
  97.     {
  98.         $this->token $token;
  99.         return $this;
  100.     }
  101.     public function getCreatedAt(): ?\DateTimeImmutable
  102.     {
  103.         return $this->created_at;
  104.     }
  105.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  106.     {
  107.         $this->created_at $created_at;
  108.         return $this;
  109.     }
  110.     /**
  111.      * @return Collection<int, Questionari>
  112.      */
  113.     public function getQuestionaris(): Collection
  114.     {
  115.         return $this->questionaris;
  116.     }
  117.     public function addQuestionari(Questionari $questionari): self
  118.     {
  119.         if (!$this->questionaris->contains($questionari)) {
  120.             $this->questionaris[] = $questionari;
  121.             $questionari->setAmbiente($this);
  122.         }
  123.         return $this;
  124.     }
  125.     public function removeQuestionari(Questionari $questionari): self
  126.     {
  127.         if ($this->questionaris->removeElement($questionari)) {
  128.             // set the owning side to null (unless already changed)
  129.             if ($questionari->getAmbiente() === $this) {
  130.                 $questionari->setAmbiente(null);
  131.             }
  132.         }
  133.         return $this;
  134.     }
  135.     public function getTipo(): ?string
  136.     {
  137.         return $this->tipo;
  138.     }
  139.     public function setTipo(string $tipo): self
  140.     {
  141.         $this->tipo $tipo;
  142.         return $this;
  143.     }
  144.     public function getName(): ?string
  145.     {
  146.         return $this->name;
  147.     }
  148.     public function setName(string $name): self
  149.     {
  150.         $this->name $name;
  151.         return $this;
  152.     }
  153.     public function getIv(): ?string
  154.     {
  155.         return $this->iv;
  156.     }
  157.     public function setIv(?string $iv): self
  158.     {
  159.         $this->iv $iv;
  160.         return $this;
  161.     }
  162.     public function getTag(): ?string
  163.     {
  164.         return $this->tag;
  165.     }
  166.     public function setTag(?string $tag): self
  167.     {
  168.         $this->tag $tag;
  169.         return $this;
  170.     }
  171.     public function getApikey(): ?string
  172.     {
  173.         return $this->apikey;
  174.     }
  175.     public function setApikey(?string $apikey): self
  176.     {
  177.         $this->apikey $apikey;
  178.         return $this;
  179.     }
  180.     public function getApisecret(): ?string
  181.     {
  182.         return $this->apisecret;
  183.     }
  184.     public function setApisecret(?string $apisecret): self
  185.     {
  186.         $this->apisecret $apisecret;
  187.         return $this;
  188.     }
  189.     /**
  190.      * @return Collection<int, QuestionariIniziati>
  191.      */
  192.     public function getQuestionariIniziatis(): Collection
  193.     {
  194.         return $this->questionariIniziatis;
  195.     }
  196.     public function addQuestionariIniziati(QuestionariIniziati $questionariIniziati): self
  197.     {
  198.         if (!$this->questionariIniziatis->contains($questionariIniziati)) {
  199.             $this->questionariIniziatis[] = $questionariIniziati;
  200.             $questionariIniziati->setAmbiente($this);
  201.         }
  202.         return $this;
  203.     }
  204.     public function removeQuestionariIniziati(QuestionariIniziati $questionariIniziati): self
  205.     {
  206.         if ($this->questionariIniziatis->removeElement($questionariIniziati)) {
  207.             // set the owning side to null (unless already changed)
  208.             if ($questionariIniziati->getAmbiente() === $this) {
  209.                 $questionariIniziati->setAmbiente(null);
  210.             }
  211.         }
  212.         return $this;
  213.     }
  214. }