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