src/Entity/ProjectSettings.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProjectSettingsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. /**
  7.  * @ORM\Entity(repositoryClass=ProjectSettingsRepository::class)
  8.  */
  9. class ProjectSettings
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      * @Groups({
  16.      *      "project_setting@core"
  17.      *  })
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="integer", nullable=true)
  22.      * @Groups({
  23.      *       "project_setting@core"
  24.      *   })
  25.      */
  26.     private $material_budget;
  27.     /**
  28.      * @ORM\Column(type="integer", nullable=true)
  29.      * @Groups({
  30.      *       "project_setting@core"
  31.      *   })
  32.      */
  33.     private $timesheet_budget;
  34.     /**
  35.      * @ORM\OneToOne(targetEntity=Projects::class, inversedBy="project_settings", cascade={"persist", "remove"})
  36.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  37.      */
  38.     private $project;
  39.     /**
  40.      * @ORM\Column(type="integer")
  41.      * @Groups({
  42.      *       "project_setting@core"
  43.      *   })
  44.      */
  45.     private $target_profit;
  46.     public function getId(): ?int
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function getMaterialBudget(): ?int
  51.     {
  52.         return $this->material_budget;
  53.     }
  54.     public function setMaterialBudget(?int $material_budget): self
  55.     {
  56.         $this->material_budget $material_budget;
  57.         return $this;
  58.     }
  59.     public function getTimesheetBudget(): ?int
  60.     {
  61.         return $this->timesheet_budget;
  62.     }
  63.     public function setTimesheetBudget(?int $timesheet_budget): self
  64.     {
  65.         $this->timesheet_budget $timesheet_budget;
  66.         return $this;
  67.     }
  68.     public function getProject(): ?Projects
  69.     {
  70.         return $this->project;
  71.     }
  72.     public function setProject(?Projects $project): self
  73.     {
  74.         $this->project $project;
  75.         return $this;
  76.     }
  77.     public function getTargetProfit(): ?int
  78.     {
  79.         return $this->target_profit;
  80.     }
  81.     public function setTargetProfit(int $target_profit): self
  82.     {
  83.         $this->target_profit $target_profit;
  84.         return $this;
  85.     }
  86. }