src/Entity/ProjectMembers.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProjectMembersRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=ProjectMembersRepository::class)
  7.  */
  8. class ProjectMembers
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=User::class)
  18.      * @ORM\JoinColumn(nullable=false)
  19.      */
  20.     private $user;
  21.     /**
  22.      * @ORM\Column(type="integer")
  23.      */
  24.     private $status;
  25.     /**
  26.      * @ORM\Column(type="boolean")
  27.      */
  28.     private $is_working_on_task;
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity=User::class)
  31.      * @ORM\JoinColumn(nullable=false)
  32.      */
  33.     private $created_by;
  34.     /**
  35.      * @ORM\Column(type="datetime")
  36.      */
  37.     private $created_at;
  38.     /**
  39.      * @ORM\ManyToOne(targetEntity=Project::class, inversedBy="projectMembers")
  40.      * @ORM\JoinColumn(nullable=false)
  41.      */
  42.     private $project;
  43.     /**
  44.      * @ORM\ManyToOne(targetEntity=ProjectStructure::class, inversedBy="projectMembers")
  45.      * @ORM\JoinColumn(nullable=false)
  46.      */
  47.     private $role;
  48.     public function getId(): ?int
  49.     {
  50.         return $this->id;
  51.     }
  52.     public function getUser(): ?User
  53.     {
  54.         return $this->user;
  55.     }
  56.     public function setUser(?User $user): self
  57.     {
  58.         $this->user $user;
  59.         return $this;
  60.     }
  61.     public function getStatus(): ?int
  62.     {
  63.         return $this->status;
  64.     }
  65.     public function setStatus(int $status): self
  66.     {
  67.         $this->status $status;
  68.         return $this;
  69.     }
  70.     public function getIsWorkingOnTask(): ?bool
  71.     {
  72.         return $this->is_working_on_task;
  73.     }
  74.     public function setIsWorkingOnTask(bool $is_working_on_task): self
  75.     {
  76.         $this->is_working_on_task $is_working_on_task;
  77.         return $this;
  78.     }
  79.     public function getCreatedBy(): ?User
  80.     {
  81.         return $this->created_by;
  82.     }
  83.     public function setCreatedBy(?User $created_by): self
  84.     {
  85.         $this->created_by $created_by;
  86.         return $this;
  87.     }
  88.     public function getCreatedAt(): ?\DateTimeInterface
  89.     {
  90.         return $this->created_at;
  91.     }
  92.     public function setCreatedAt(\DateTimeInterface $created_at): self
  93.     {
  94.         $this->created_at $created_at;
  95.         return $this;
  96.     }
  97.     public function __toString()
  98.     {
  99.         
  100.         return ''.$this->user;
  101.     }
  102.     public function getProject(): ?Project
  103.     {
  104.         return $this->project;
  105.     }
  106.     public function setProject(?Project $project): self
  107.     {
  108.         $this->project $project;
  109.         return $this;
  110.     }
  111.     public function getRole(): ?ProjectStructure
  112.     {
  113.         return $this->role;
  114.     }
  115.     public function setRole(?ProjectStructure $role): self
  116.     {
  117.         $this->role $role;
  118.         return $this;
  119.     }
  120. }