src/Entity/Tickets.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TicketsRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. /**
  9.  * @ORM\Entity(repositoryClass=TicketsRepository::class)
  10.  */
  11. class Tickets
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\ManyToOne(targetEntity=Users::class, inversedBy="tickets")
  21.      */
  22.     private $user;
  23.     /**
  24.      * @ORM\Column(type="string", length=255)
  25.      */
  26.     private $subject;
  27.     /**
  28.      * @ORM\Column(type="string", length=255)
  29.      */
  30.     private $description;
  31.     /**
  32.      * @ORM\Column(type="string", length=255)
  33.      */
  34.     private $notes;
  35.     /**
  36.      * @ORM\Column(type="boolean")
  37.      */
  38.     private $deleted;
  39.     /**
  40.      * @ORM\Column(type="datetime")
  41.      */
  42.     private $updated_at;
  43.     /**
  44.      * @ORM\Column(type="datetime")
  45.      */
  46.     private $created_at;
  47.     /**
  48.      * @ORM\ManyToOne(targetEntity=Users::class)
  49.      * @ORM\JoinColumn(nullable=false)
  50.      */
  51.     private $created_by;
  52.     /**
  53.      * @ORM\ManyToOne(targetEntity=Users::class)
  54.      * @ORM\JoinColumn(nullable=false)
  55.      */
  56.     private $update_by;
  57.     /**
  58.      * @ORM\ManyToOne(targetEntity=Accounts::class)
  59.      */
  60.     private $account;
  61.     /**
  62.      * @ORM\ManyToOne(targetEntity=Departments::class)
  63.      * @ORM\JoinColumn(nullable=false)
  64.      */
  65.     private $departments;
  66.     /**
  67.      * @ORM\ManyToOne(targetEntity=Status::class)
  68.      * @ORM\JoinColumn(nullable=false)
  69.      */
  70.     private $status;
  71.     /**
  72.      * @ORM\ManyToOne(targetEntity=Priorities::class)
  73.      * @ORM\JoinColumn(nullable=false)
  74.      */
  75.     private $priorities;
  76.     /**
  77.      * @ORM\ManyToOne(targetEntity=Categories::class)
  78.      * @ORM\JoinColumn(nullable=false)
  79.      */
  80.     private $categories;
  81.     /**
  82.      * @ORM\Column(type="boolean", nullable=true)
  83.      */
  84.     private $active;
  85.     /**
  86.      * @ORM\Column(type="string", length=255, nullable=true)
  87.      */
  88.     private $token;
  89.     public function __construct()
  90.     {
  91.         $this->contacts = new ArrayCollection();
  92.         $this->replys = new ArrayCollection();
  93.         $this->uploads = new ArrayCollection();
  94.     }
  95.     public function getId(): ?int
  96.     {
  97.         return $this->id;
  98.     }
  99.     public function getUser(): ?Users
  100.     {
  101.         return $this->user;
  102.     }
  103.     public function setUser(?Users $user): self
  104.     {
  105.         $this->user $user;
  106.         return $this;
  107.     }
  108.     public function getSubject(): ?string
  109.     {
  110.         return $this->subject;
  111.     }
  112.     public function setSubject(string $subject): self
  113.     {
  114.         $this->subject $subject;
  115.         return $this;
  116.     }
  117.     public function getDescription(): ?string
  118.     {
  119.         return $this->description;
  120.     }
  121.     public function setDescription(string $description): self
  122.     {
  123.         $this->description $description;
  124.         return $this;
  125.     }
  126.     public function getNotes(): ?string
  127.     {
  128.         return $this->notes;
  129.     }
  130.     public function setNotes(string $notes): self
  131.     {
  132.         $this->notes $notes;
  133.         return $this;
  134.     }
  135.     public function isDeleted(): ?bool
  136.     {
  137.         return $this->deleted;
  138.     }
  139.     public function setDeleted(bool $deleted): self
  140.     {
  141.         $this->deleted $deleted;
  142.         return $this;
  143.     }
  144.     public function getUpdatedAt(): ?\DateTimeInterface
  145.     {
  146.         return $this->updated_at;
  147.     }
  148.     public function setUpdatedAt(\DateTimeInterface $updated_at): self
  149.     {
  150.         $this->updated_at $updated_at;
  151.         return $this;
  152.     }
  153.     public function getCreatedAt(): ?\DateTimeInterface
  154.     {
  155.         return $this->created_at;
  156.     }
  157.     public function setCreatedAt(\DateTimeInterface $created_at): self
  158.     {
  159.         $this->created_at $created_at;
  160.         return $this;
  161.     }
  162.     public function getCreatedBy(): ?users
  163.     {
  164.         return $this->created_by;
  165.     }
  166.     public function setCreatedBy(?users $created_by): self
  167.     {
  168.         $this->created_by $created_by;
  169.         return $this;
  170.     }
  171.     public function getUpdateBy(): ?users
  172.     {
  173.         return $this->update_by;
  174.     }
  175.     public function setUpdateBy(?users $update_by): self
  176.     {
  177.         $this->update_by $update_by;
  178.         return $this;
  179.     }
  180.     public function getAccount(): ?accounts
  181.     {
  182.         return $this->account;
  183.     }
  184.     public function setAccount(?accounts $account): self
  185.     {
  186.         $this->account $account;
  187.         return $this;
  188.     }
  189.     
  190.     /**
  191.      * @return Collection<int, replys>
  192.      */
  193.     public function getReplys(): Collection
  194.     {
  195.         return $this->replys;
  196.     }
  197.     public function addReply(replys $reply): self
  198.     {
  199.         if (!$this->replys->contains($reply)) {
  200.             $this->replys[] = $reply;
  201.         }
  202.         return $this;
  203.     }
  204.     public function removeReply(replys $reply): self
  205.     {
  206.         $this->replys->removeElement($reply);
  207.         return $this;
  208.     }
  209.     /**
  210.      * @return Collection<int, uploads>
  211.      */
  212.     public function getUploads(): Collection
  213.     {
  214.         return $this->uploads;
  215.     }
  216.     public function addUpload(uploads $upload): self
  217.     {
  218.         if (!$this->uploads->contains($upload)) {
  219.             $this->uploads[] = $upload;
  220.         }
  221.         return $this;
  222.     }
  223.     public function removeUpload(uploads $upload): self
  224.     {
  225.         $this->uploads->removeElement($upload);
  226.         return $this;
  227.     }
  228.     public function getDepartments(): ?departments
  229.     {
  230.         return $this->departments;
  231.     }
  232.     public function setDepartments(?departments $departments): self
  233.     {
  234.         $this->departments $departments;
  235.         return $this;
  236.     }
  237.     public function getStatus(): ?status
  238.     {
  239.         return $this->status;
  240.     }
  241.     public function setStatus(?status $status): self
  242.     {
  243.         $this->status $status;
  244.         return $this;
  245.     }
  246.     public function getPriorities(): ?priorities
  247.     {
  248.         return $this->priorities;
  249.     }
  250.     public function setPriorities(?priorities $priorities): self
  251.     {
  252.         $this->priorities $priorities;
  253.         return $this;
  254.     }
  255.     public function getCategories(): ?categories
  256.     {
  257.         return $this->categories;
  258.     }
  259.     public function setCategories(?categories $categories): self
  260.     {
  261.         $this->categories $categories;
  262.         return $this;
  263.     }
  264.     public function isActive(): ?bool
  265.     {
  266.         return $this->active;
  267.     }
  268.     public function setActive(?bool $active): self
  269.     {
  270.         $this->active $active;
  271.         return $this;
  272.     }
  273.     public function getToken(): ?string
  274.     {
  275.         return $this->token;
  276.     }
  277.     public function setToken(?string $token): self
  278.     {
  279.         $this->token $token;
  280.         return $this;
  281.     }
  282. }