src/Entity/Projects.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProjectsRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Event\LifecycleEventArgs;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Doctrine\ORM\PersistentCollection;
  9. use phpDocumentor\Reflection\Types\Float_;
  10. use function PHPSTORM_META\map;
  11. use function Sodium\add;
  12. use function Sodium\crypto_generichash_final;
  13. use Symfony\Component\Serializer\Annotation\Groups;
  14. /**
  15.  * @ORM\Entity(repositoryClass=ProjectsRepository::class)
  16.  * @ORM\HasLifecycleCallbacks
  17.  */
  18. class Projects
  19. {
  20.     /*
  21.      * @ORM\PostLoad
  22.      * @ORM\PrePersist
  23.      * @ORM\PreUpdate
  24.      * @param LifecycleEventArgs $lifecycleEventArgs
  25.         public function init( LifecycleEventArgs $lifecycleEventArgs ){
  26.             $this->setTotalCost(); 
  27.         }
  28.         */
  29.     // TODO replace project.base with project.core
  30.     /**
  31.      * @ORM\Id
  32.      * @ORM\GeneratedValue
  33.      * @ORM\Column(type="integer")
  34.      * @Groups({
  35.      *     "project.base",
  36.      *     "project.core",
  37.      *     "project.selectable.list",
  38.      *     "customer.manage.base",
  39.      *     "stakeholder.selected.core.project.manage",
  40.      *     "customer.selected.project",
  41.      *     "worker.join.to.project",
  42.      *     "worker.manage.joined.projects",
  43.      *     "worker.manage.selectable.stakeholder.projects",
  44.      *     "selected.customer.project.for.worker",
  45.      *     "worker.manage.selected.worker.in.project",
  46.      *     "worker.manage.base.timesheet.payments",
  47.      *
  48.      *     "customer.selected.project",
  49.      *
  50.      *
  51.      *     "project.list.with.necessary.details",
  52.      *     "project.details",
  53.      *
  54.      *     "order.assigned.project.minify",
  55.      *
  56.      *     "project.details.for.collected.timesheet"
  57.      *
  58.      *
  59.      * })
  60.      */
  61.         #"project.orders.expense.position.base"
  62.     private $id;
  63.     /**
  64.      * @ORM\Column(type="string", length=255)
  65.      * @Groups({"project.base",
  66.      *     "project.core",
  67.      *     "project.selectable.list",
  68.      *     "customer.manage.base",
  69.      *     "stakeholder.selected.core.project.manage",
  70.      *     "customer.selected.project",
  71.      *     "worker.join.to.project",
  72.      *     "worker.manage.joined.projects",
  73.      *     "worker.manage.selectable.stakeholder.projects",
  74.      *     "selected.customer.project.for.worker",
  75.      *     "worker.manage.selected.worker.in.project",
  76.      *     "worker.manage.base.timesheet.payments",
  77.      *     "timesheet.for.customer",
  78.      *
  79.      *     "customer.selected.project",
  80.      *     "project.list.with.necessary.details",
  81.      *
  82.      *     "project.details",
  83.      *
  84.      *     "order.assigned.project.minify",
  85.      *
  86.      *     "project.details.for.collected.timesheet"
  87.      *
  88.      *     })
  89.      */
  90.     #"project.orders.expense.position.base"
  91.     private $name;
  92.     /**
  93.      * @ORM\Column(type="datetime_immutable", nullable=true)
  94.      * @Groups({"project.base",
  95.      *     "project.core",
  96.      *     "customer.manage.base",
  97.      *     "stakeholder.selected.core.project.manage",
  98.      *     "customer.selected.project",
  99.      *     "worker.manage.joined.projects",
  100.      *     "selected.customer.project.for.worker",
  101.      *     "worker.manage.selected.worker.in.project",
  102.      *     "project.list.with.necessary.details",
  103.      *
  104.      *
  105.      *     "project.details"
  106.      * })
  107.      */
  108.     private $start_at;
  109.     /**
  110.      * @ORM\Column(type="datetime_immutable", nullable=true)
  111.      * @Groups({"project.base",
  112.      *     "project.core",
  113.      *     "customer.manage.base",
  114.      *     "stakeholder.selected.core.project.manage",
  115.      *     "customer.selected.project",
  116.      *     "worker.manage.joined.projects",
  117.      *     "selected.customer.project.for.worker",
  118.      *     "worker.manage.selected.worker.in.project",
  119.      *     "project.list.with.necessary.details",
  120.      *
  121.      *
  122.      *     "project.details"
  123.      * })
  124.      */
  125.     private $end_at;
  126.     /**
  127.      * @ORM\Column(type="datetime_immutable")
  128.      */
  129.     private $created_at;
  130.     /**
  131.      * @ORM\OneToMany(targetEntity=ProjectStakeholders::class, mappedBy="project")
  132.      */
  133.     private $stakeholders;
  134.     /**
  135.      * @ORM\ManyToMany(targetEntity=Qualification::class, inversedBy="projects")
  136.      * @ORM\JoinColumn(onDelete="CASCADE")
  137.      * @Groups({
  138.      *     "project.qualifications",
  139.      *     "customer.manage.base",
  140.      *     "stakeholder.selected.core.project.manage",
  141.      *     "customer.selected.project",
  142.      *     "selected.customer.project.for.worker",
  143.      *     "worker.manage.selected.worker.in.project"
  144.      * })
  145.      *
  146.      */
  147.     private $dependent_qualifications;
  148.     /**
  149.      * @ORM\ManyToMany(targetEntity=Certificates::class, inversedBy="projects")
  150.      * @ORM\JoinColumn(onDelete="CASCADE")
  151.      * @Groups({
  152.      *     "project.certificates",
  153.      *     "customer.manage.base",
  154.      *     "stakeholder.selected.core.project.manage",
  155.      *     "customer.selected.project",
  156.      *     "selected.customer.project.for.worker",
  157.      *     "worker.manage.selected.worker.in.project"
  158.      * })
  159.      */
  160.     private $dependent_certificates;
  161.     /**
  162.      * @ORM\ManyToOne(targetEntity=ProjectOwner::class, inversedBy="projects")
  163.      * @ORM\JoinColumn(nullable=true)
  164.      * @Groups({
  165.      *     "project.owner",
  166.      *     "project.list.with.necessary.details",
  167.      *     "project.details",
  168.      *
  169.      *     "project.details.for.collected.timesheet"
  170.      * })
  171.      */
  172.     private $owner;
  173.     /**
  174.      * @ORM\ManyToOne(targetEntity=Countries::class, inversedBy="projects")
  175.      * @Groups({
  176.      *     "project.base",
  177.      *     "project.core",
  178.      *     "project.list.with.necessary.details",
  179.      *     "project.details"
  180.      * })
  181.      */
  182.     private Countries $country;
  183.     /**
  184.      * @ORM\Column(type="string", length=64, nullable=true )
  185.      * @Groups({
  186.      *     "project.base",
  187.      *     "project.core",
  188.      *     "customer.manage.base",
  189.      *     "project.list.with.necessary.details",
  190.      *     
  191.      *      "project.selectable.list",
  192.      *      "stakeholder.selected.core.project.manage",
  193.      *      "customer.selected.project",
  194.      *      "worker.manage.selectable.stakeholder.projects",
  195.      *      "selected.customer.project.for.worker",
  196.      *      "worker.manage.selected.worker.in.project",
  197.      *      "worker.manage.joined.projects",
  198.      *
  199.      *
  200.      *     "project.details",
  201.      *
  202.      *     "project.details.for.collected.timesheet"
  203.      *
  204.      *
  205.      * })
  206.      */
  207.     #"project.orders.expense.position.base"
  208.     private ?string $project_id;
  209.     /**
  210.      * @ORM\OneToMany(targetEntity=ProjectAddendumCosts::class, mappedBy="project", cascade={"persist", "remove"})
  211.      * @ORM\OrderBy({"id":"DESC"})
  212.      * @ORM\JoinColumn(onDelete="CASCADE")
  213.      * @Groups({
  214.      *     "customer.manage.base",
  215.      *     "project.list.with.necessary.details",
  216.      *     "project.details"
  217.      * })
  218.      */
  219.     private $project_addendum_costs;
  220.     /**
  221.      * ----------------------------------------------------------------------------------------------------------------
  222.      * This is custom column not associated to table
  223.      * Event Listener Prop
  224.      * This prop Update during event.listener
  225.      * @Groups({
  226.      *     "project.base",
  227.      *     "project.core",
  228.      *     "project.selectable.list",
  229.      *     "customer.manage.base",
  230.      *     "stakeholder.selected.core.project.manage",
  231.      *     "customer.selected.project",
  232.      *     "worker.manage.joined.projects",
  233.      *     "worker.manage.selectable.stakeholder.projects",
  234.      *     "selected.customer.project.for.worker",
  235.      *     "worker.manage.selected.worker.in.project",
  236.      *     "project.list.with.necessary.details"
  237.      * })
  238.      */
  239.     private array $status;
  240.     /**
  241.      * Event Listener Prop
  242.      * This prop Update during event.listener
  243.      * @param array $status
  244.      */
  245.     public function setStatus( array $status ): void {
  246.         $this->status $status;
  247.     }
  248.     /** * Event Listener Prop */
  249.     public function getStatus(): array {
  250.         return $this->status;
  251.     }
  252.     // ----------------------------------------------------------------------------------------------------------------
  253.     /**
  254.      * @Groups({
  255.      *     "project.base",
  256.      *     "project.core",
  257.      *     "project.details"
  258.      * })
  259.      */
  260.     private array $total_cost;
  261.     /**
  262.      * TODO bunu incele cunku Project_order_expenses olayi var
  263.      * @deprecated
  264.      * @ORM\OneToMany(targetEntity=ProjectExpense::class, mappedBy="project", orphanRemoval=true)
  265.      * @ORM\JoinColumn(onDelete="CASCADE", nullable=true)
  266.      * @Groups({"project.expenses"})
  267.      */
  268.     private $project_expenses;
  269.     /**
  270.      * @ORM\Column(type="text", nullable=true)
  271.      * @Groups({
  272.      *     "project.base",
  273.      *     "project.core"
  274.      *     })
  275.      */
  276.     private ?string $qr_code '';
  277.     /**
  278.      * @ORM\Column(type="text", nullable=true)
  279.      * @Groups({
  280.      *     "project.base",
  281.      *     "project.core"
  282.      * })
  283.      */
  284.     private ?string $address;
  285.     /**
  286.      * @deprecated
  287.      * @ORM\Column(type="string", length=255, nullable=true, unique=false )
  288.      * @Groups({
  289.      *     "project.base",
  290.      *     "project.core"
  291.      * })
  292.      */
  293.     private $longitude;
  294.     /**
  295.      * @deprecated
  296.      * @ORM\Column(type="string", length=255, nullable=true, unique=false )
  297.      * @Groups({
  298.      *     "project.base",
  299.      *     "project.core"
  300.      * })
  301.      */
  302.     private $latitude;
  303.     /**
  304.      * @deprecated
  305.      * @ORM\Column(type="integer", nullable=true)
  306.      * @Groups({
  307.      *     "project.base",
  308.      *     "project.core"
  309.      * })
  310.      */
  311.     private $scan_distance;
  312.     /**
  313.      * @ORM\Column(type="integer", nullable=true)
  314.      * @Groups({
  315.      *     "project.base",
  316.      *     "project.core"
  317.      * })
  318.      */
  319.     private ?int $reward_time;
  320.     /**
  321.      * @ORM\Column(type="integer", nullable=true)
  322.      * @Groups({
  323.      *     "project.base",
  324.      *     "project.core"
  325.      * })
  326.      */
  327.     private ?int $work_pause;
  328.     /**
  329.      * @ORM\Column(type="string", length=10, nullable=true)
  330.      * @Groups({
  331.      *     "project.base",
  332.      *     "project.core"
  333.      * })
  334.      */
  335.     private ?string $working_time_start;
  336.     /**
  337.      * @ORM\Column(type="string", length=10, nullable=true)
  338.      * @Groups({
  339.      *     "project.base",
  340.      *     "project.core"
  341.      * })
  342.      */
  343.     private ?string $working_time_stop;
  344.     /**
  345.      * @ORM\Column(type="string", length=12, nullable=true)
  346.      * @Groups({
  347.      *     "project.base",
  348.      *     "project.core"
  349.      * })
  350.      */
  351.     private ?string $code_postal;
  352.     /**
  353.      * @ORM\Column(type="string", length=64, nullable=true)
  354.      * @Groups({
  355.      *     "project.base",
  356.      *     "project.core",
  357.      *     "project.list.with.necessary.details"
  358.      * })
  359.      */
  360.     private ?string $town;
  361.     /**
  362.      * @ORM\OneToMany(targetEntity=ProjectBranches::class, mappedBy="project", cascade={"persist", "remove"}, orphanRemoval=true, fetch="EAGER")
  363.      * @Groups({
  364.      *     "project.branches",
  365.      *     "customer.manage.base",
  366.      *     "stakeholder.selected.core.project.manage",
  367.      *     "worker.manage.selected.worker.in.project",
  368.      *     "selected.customer.project.for.worker",
  369.      *     "customer.selected.project",
  370.      *
  371.      *     "project.details.for.collected.timesheet"
  372.      * })
  373.      */
  374.     private $project_branches;
  375.     /**
  376.      * @ORM\OneToMany(targetEntity=ProjectOrders::class, mappedBy="project", orphanRemoval=true, cascade={"persist", "remove"})
  377.      * @Groups({
  378.      *     "project.orders",
  379.      *     "worker.manage.base.timesheet",
  380.      *     "customer.selected.project",
  381.      *     "project.list.with.necessary.details",
  382.      *     "project.details",
  383.      *
  384.      *     "project.details.orders",
  385.      *
  386.      *     "project.details.for.collected.timesheet"
  387.      *
  388.      *     })
  389.      */
  390.     private $project_orders;
  391.     /**
  392.      * @ORM\OneToMany(targetEntity=WorkerTimesheetPayments::class, mappedBy="project")
  393.      */
  394.     private $worker_timesheet_payments;
  395.     /**
  396.      * @ORM\ManyToOne(targetEntity=InvoiceType::class, inversedBy="projects")
  397.      * @Groups({
  398.      *     "project.details",
  399.      *     "project.base",
  400.      *     "project.core"
  401.      *     })
  402.      */
  403.     private $invoice_type;
  404.     /**
  405.      * @ORM\Column(type="boolean", nullable=true)
  406.      * @Groups({
  407.      *      "project.details",
  408.      *      "project.base",
  409.      *     "project.core"
  410.      *      })
  411.      */
  412.     private $is_archived;
  413.     /**
  414.      * @ORM\Column(type="boolean", nullable=true)
  415.      * @Groups({
  416.      *      "project.details",
  417.      *      "project.base",
  418.      *     "project.core"
  419.      *      })
  420.      */
  421.     private $is_recycle;
  422.     /**
  423.      * @ORM\OneToOne(targetEntity=ProjectSettings::class, mappedBy="project", cascade={"persist", "remove"})
  424.      * @Groups({
  425.      *       "project.settings"
  426.      * })
  427.      *
  428.      */
  429.     private $project_settings;
  430.     public function __construct()
  431.     {
  432.         $this->stakeholders = new ArrayCollection();
  433.         $this->dependent_qualifications = new ArrayCollection();
  434.         $this->dependent_certificates = new ArrayCollection();
  435.         $this->project_addendum_costs = new ArrayCollection();
  436.         $this->project_expenses = new ArrayCollection();
  437.         $this->project_branches = new ArrayCollection();
  438.         $this->project_orders = new ArrayCollection();
  439.         $this->worker_timesheet_payments = new ArrayCollection();
  440.     }
  441.     public function getId(): ?int
  442.     {
  443.         return $this->id;
  444.     }
  445.     public function getName(): ?string
  446.     {
  447.         return $this->name;
  448.     }
  449.     public function setName(string $name): self
  450.     {
  451.         $this->name $name;
  452.         return $this;
  453.     }
  454.     public function getStartAt(): ?\DateTimeImmutable
  455.     {
  456.         return $this->start_at;
  457.     }
  458.     public function setStartAt(?\DateTimeImmutable $start_at): self
  459.     {
  460.         $this->start_at $start_at;
  461.         return $this;
  462.     }
  463.     public function getEndAt(): ?\DateTimeImmutable
  464.     {
  465.         return $this->end_at;
  466.     }
  467.     public function setEndAt(?\DateTimeImmutable $end_at): self
  468.     {
  469.         $this->end_at $end_at;
  470.         return $this;
  471.     }
  472.     public function getCreatedAt(): ?\DateTimeImmutable
  473.     {
  474.         return $this->created_at;
  475.     }
  476.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  477.     {
  478.         $this->created_at $created_at;
  479.         return $this;
  480.     }
  481. //    /**
  482. //     * @return Collection<int, ProjectStakeholders>
  483. //     */
  484.     public function getStakeholders(): Collection
  485.     {
  486.         return $this->stakeholders;
  487.     }
  488.     public function addStakeholder(ProjectStakeholders $stakeholder): self
  489.     {
  490.         if (!$this->stakeholders->contains($stakeholder)) {
  491.             $this->stakeholders[] = $stakeholder;
  492.             $stakeholder->setProject($this);
  493.         }
  494.         return $this;
  495.     }
  496.     public function removeStakeholder(ProjectStakeholders $stakeholder): self
  497.     {
  498.         if ($this->stakeholders->removeElement($stakeholder)) {
  499.             // set the owning side to null (unless already changed)
  500.             if ($stakeholder->getProject() === $this) {
  501.                 $stakeholder->setProject(null);
  502.             }
  503.         }
  504.         return $this;
  505.     }
  506.     /**
  507.      * @return Collection<int, Qualification>
  508.      */
  509.     public function getDependentQualifications(): Collection
  510.     {
  511.         return $this->dependent_qualifications;
  512.     }
  513.     public function addDependentQualification(Qualification $dependentQualification): self
  514.     {
  515.         if (!$this->dependent_qualifications->contains($dependentQualification)) {
  516.             $this->dependent_qualifications[] = $dependentQualification;
  517.         }
  518.         return $this;
  519.     }
  520.     public function removeDependentQualification(Qualification $dependentQualification): self
  521.     {
  522.         $this->dependent_qualifications->removeElement($dependentQualification);
  523.         return $this;
  524.     }
  525.     /**
  526.      * @return Collection<int, Certificates>
  527.      */
  528.     public function getDependentCertificates(): Collection
  529.     {
  530.         return $this->dependent_certificates;
  531.     }
  532.     public function addDependentCertificate(Certificates $dependentCertificate): self
  533.     {
  534.         if (!$this->dependent_certificates->contains($dependentCertificate)) {
  535.             $this->dependent_certificates[] = $dependentCertificate;
  536.         }
  537.         return $this;
  538.     }
  539.     public function removeDependentCertificate(Certificates $dependentCertificate): self
  540.     {
  541.         $this->dependent_certificates->removeElement($dependentCertificate);
  542.         return $this;
  543.     }
  544.     public function getOwner(): ?ProjectOwner
  545.     {
  546.         return $this->owner;
  547.     }
  548.     public function setOwner(?ProjectOwner $owner): self
  549.     {
  550.         $this->owner $owner;
  551.         return $this;
  552.     }
  553.     public function getCountry(): ?Countries
  554.     {
  555.         return $this->country;
  556.     }
  557.     public function setCountry(?Countries $country): self
  558.     {
  559.         $this->country $country;
  560.         return $this;
  561.     }
  562.     public function getProjectId(): ?string
  563.     {
  564.         return $this->project_id;
  565.     }
  566.     public function setProjectId(?string $project_id): self
  567.     {
  568.         $this->project_id $project_id;
  569.         return $this;
  570.     }
  571.     /**
  572.      * @return Collection<int, ProjectAddendumCosts>
  573.      */
  574.     public function getProjectAddendumCosts(): Collection
  575.     {
  576.         return $this->project_addendum_costs;
  577.     }
  578.     public function addProjectAddendumCost(ProjectAddendumCosts $projectAddendumCost): self
  579.     {
  580.         if (!$this->project_addendum_costs->contains($projectAddendumCost)) {
  581.             $this->project_addendum_costs[] = $projectAddendumCost;
  582.             $projectAddendumCost->setProject($this);
  583.         }
  584.         return $this;
  585.     }
  586.     public function removeProjectAddendumCost(ProjectAddendumCosts $projectAddendumCost): self
  587.     {
  588.         if ($this->project_addendum_costs->removeElement($projectAddendumCost)) {
  589.             // set the owning side to null (unless already changed)
  590.             if ($projectAddendumCost->getProject() === $this) {
  591.                 $projectAddendumCost->setProject(null);
  592.             }
  593.         }
  594.         return $this;
  595.     }
  596.     public function getTotalCost(): array{
  597.         return $this->total_cost;
  598.     }
  599.     /**
  600.      * @return Collection<int, ProjectExpense>
  601.      */
  602.     public function getProjectExpenses(): Collection
  603.     {
  604.         return $this->project_expenses;
  605.     }
  606.     public function addProjectExpense(ProjectExpense $projectExpense): self
  607.     {
  608.         if (!$this->project_expenses->contains($projectExpense)) {
  609.             $this->project_expenses[] = $projectExpense;
  610.             $projectExpense->setProject($this);
  611.         }
  612.         return $this;
  613.     }
  614.     public function removeProjectExpense(ProjectExpense $projectExpense): self
  615.     {
  616.         if ($this->project_expenses->removeElement($projectExpense)) {
  617.             // set the owning side to null (unless already changed)
  618.             if ($projectExpense->getProject() === $this) {
  619.                 $projectExpense->setProject(null);
  620.             }
  621.         }
  622.         return $this;
  623.     }
  624.     public function getQrCode(): ?string
  625.     {
  626.         return $this->qr_code;
  627.     }
  628.     public function setQrCode(?string $qr_code): self
  629.     {
  630.         $this->qr_code $qr_code;
  631.         return $this;
  632.     }
  633.     public function getLongitude(): ?string
  634.     {
  635.         return $this->longitude;
  636.     }
  637.     public function setLongitude(?string $longitude): self
  638.     {
  639.         $this->longitude $longitude;
  640.         return $this;
  641.     }
  642.     public function getLatitude(): ?string
  643.     {
  644.         return $this->latitude;
  645.     }
  646.     public function setLatitude(?string $latitude): self
  647.     {
  648.         $this->latitude $latitude;
  649.         return $this;
  650.     }
  651.     public function getAddress(): ?string
  652.     {
  653.         return $this->address;
  654.     }
  655.     public function setAddress(?string $address): self
  656.     {
  657.         $this->address $address;
  658.         return $this;
  659.     }
  660.     public function getScanDistance(): ?int
  661.     {
  662.         return $this->scan_distance;
  663.     }
  664.     public function setScanDistance(?int $scan_distance): self
  665.     {
  666.         $this->scan_distance $scan_distance;
  667.         return $this;
  668.     }
  669.     public function getRewardTime(): ?int
  670.     {
  671.         return $this->reward_time;
  672.     }
  673.     public function setRewardTime(?int $reward_time): self
  674.     {
  675.         $this->reward_time $reward_time;
  676.         return $this;
  677.     }
  678.     public function getWorkPause(): ?int
  679.     {
  680.         return $this->work_pause;
  681.     }
  682.     public function setWorkPause(?int $work_pause): self
  683.     {
  684.         $this->work_pause $work_pause;
  685.         return $this;
  686.     }
  687.     public function getWorkingTimeStart(): ?string
  688.     {
  689.         return $this->working_time_start;
  690.     }
  691.     public function setWorkingTimeStart(?string $working_time_start): self
  692.     {
  693.         $this->working_time_start $working_time_start;
  694.         return $this;
  695.     }
  696.     public function getWorkingTimeStop(): ?string
  697.     {
  698.         return $this->working_time_stop;
  699.     }
  700.     public function setWorkingTimeStop(?string $working_time_stop): self
  701.     {
  702.         $this->working_time_stop $working_time_stop;
  703.         return $this;
  704.     }
  705.     public function getCodePostal(): ?string
  706.     {
  707.         return $this->code_postal;
  708.     }
  709.     public function setCodePostal(?string $code_postal): self
  710.     {
  711.         $this->code_postal $code_postal;
  712.         return $this;
  713.     }
  714.     public function getTown(): ?string
  715.     {
  716.         return $this->town;
  717.     }
  718.     public function setTown(?string $town): self
  719.     {
  720.         $this->town $town;
  721.         return $this;
  722.     }
  723.     /**
  724.      * @return Collection<int, ProjectBranches>
  725.      */
  726.     public function getProjectBranches(): Collection
  727.     {
  728.         return $this->project_branches;
  729.     }
  730.     public function addProjectBranch(ProjectBranches $projectBranch): self
  731.     {
  732.         if (!$this->project_branches->contains($projectBranch)) {
  733.             $this->project_branches[] = $projectBranch;
  734.             $projectBranch->setProject($this);
  735.         }
  736.         return $this;
  737.     }
  738.     public function removeProjectBranch(ProjectBranches $projectBranch): self
  739.     {
  740.         if ($this->project_branches->removeElement($projectBranch)) {
  741.             // set the owning side to null (unless already changed)
  742.             if ($projectBranch->getProject() === $this) {
  743.                 $projectBranch->setProject(null);
  744.             }
  745.         }
  746.         return $this;
  747.     }
  748.     /**
  749.      * @return Collection<int, ProjectOrder>
  750.      */
  751.     public function getProjectOrders(): Collection
  752.     {
  753.         return $this->project_orders;
  754.     }
  755.     public function addProjectOrder(ProjectOrders $projectOrder): self
  756.     {
  757.         if (!$this->project_orders->contains($projectOrder)) {
  758.             $this->project_orders[] = $projectOrder;
  759.             $projectOrder->setProject($this);
  760.         }
  761.         return $this;
  762.     }
  763.     public function removeProjectOrder(ProjectOrders $projectOrder): self
  764.     {
  765.         if ($this->project_orders->removeElement($projectOrder)) {
  766.             // set the owning side to null (unless already changed)
  767.             if ($projectOrder->getProject() === $this) {
  768.                 $projectOrder->setProject(null);
  769.             }
  770.         }
  771.         return $this;
  772.     }
  773.     /**
  774.      * @return Collection<int, WorkerTimesheetPayments>
  775.      */
  776.     public function getWorkerTimesheetpayments(): Collection
  777.     {
  778.         return $this->worker_timesheet_payments;
  779.     }
  780.     public function addWorkerTimesheetPayment(WorkerTimesheetPayments $workerTimesheetPayment): self
  781.     {
  782.         if (!$this->worker_timesheet_payments->contains($workerTimesheetPayment)) {
  783.             $this->worker_timesheet_payments[] = $workerTimesheetPayment;
  784.             $workerTimesheetPayment->setProject($this);
  785.         }
  786.         return $this;
  787.     }
  788.     public function removeWorkerTimesheetPayment(WorkerTimesheetPayments $workerTimesheetPayment): self
  789.     {
  790.         if ($this->worker_timesheet_payments->removeElement($workerTimesheetPayment)) {
  791.             // set the owning side to null (unless already changed)
  792.             if ($workerTimesheetPayment->getProject() === $this) {
  793.                 $workerTimesheetPayment->setProject(null);
  794.             }
  795.         }
  796.         return $this;
  797.     }
  798.     /**
  799.      * @return Collection<int, OrderBilled>
  800.      */
  801.     public function getInvoiceType(): ?InvoiceType
  802.     {
  803.         return $this->invoice_type;
  804.     }
  805.     public function setInvoiceType(?InvoiceType $invoice_type): self
  806.     {
  807.         $this->invoice_type $invoice_type;
  808.         return $this;
  809.     }
  810.     public function isArchived(): ?bool
  811.     {
  812.         return $this->is_archived;
  813.     }
  814.     public function setIsArchived(?bool $is_archived): self
  815.     {
  816.         $this->is_archived $is_archived;
  817.         return $this;
  818.     }
  819.     public function isRecycle(): ?bool
  820.     {
  821.         return $this->is_recycle;
  822.     }
  823.     public function setIsRecycle(?bool $is_recycle): self
  824.     {
  825.         $this->is_recycle $is_recycle;
  826.         return $this;
  827.     }
  828.     public function getProjectSettings(): ?ProjectSettings
  829.     {
  830.         return $this->project_settings;
  831.     }
  832.     public function setProjectSetting(ProjectSettings $projectSetting): self
  833.     {
  834.         if ($projectSetting->getProject() !== $this) {
  835.             $projectSetting->setProject($this);
  836.         }
  837.         $this->project_settings $projectSetting;
  838.         return $this;
  839.     }
  840. }