src/Entity/QuotaAssignment.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Enum\QuotaAssignmentType;
  4. use App\Enum\QuotaAssignmentAmountUnitType;
  5. use App\Repository\QuotaAssignmentRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Timestampable\Traits\TimestampableEntity;
  8. #[ORM\Entity(repositoryClassQuotaAssignmentRepository::class)]
  9. class QuotaAssignment
  10. {
  11.     use TimestampableEntity;
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\ManyToOne(inversedBy'quotaAssignments')]
  17.     #[ORM\JoinColumn(nullablefalse)]
  18.     private ?Quota $quota null;
  19.     #[ORM\Column(length255)]
  20.     private ?QuotaAssignmentType $type QuotaAssignmentType::DEFAULT;
  21.     #[ORM\Column]
  22.     private ?float $amount null;
  23.     #[ORM\Column(length255)]
  24.     private ?QuotaAssignmentAmountUnitType $amountUnitType QuotaAssignmentAmountUnitType::USD;
  25.     #[ORM\ManyToOne(inversedBy'quotaAssignments')]
  26.     private ?Period $effectiveStartPeriod null;
  27.     #[ORM\ManyToOne(inversedBy'quotaAssignments')]
  28.     private ?Period $effectiveEndPeriod null;
  29.     #[ORM\ManyToOne(inversedBy'quotaAssignments')]
  30.     private ?Position $position null;
  31.     #[ORM\ManyToOne(inversedBy'quotaAssignments')]
  32.     private ?Title $title null;
  33.     #[ORM\ManyToOne(inversedBy'quotaAssignments')]
  34.     private ?Period $period null;
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getQuota(): ?Quota
  40.     {
  41.         return $this->quota;
  42.     }
  43.     public function setQuota(?Quota $quota): self
  44.     {
  45.         $this->quota $quota;
  46.         return $this;
  47.     }
  48.     public function getType(): ?QuotaAssignmentType
  49.     {
  50.         return $this->type;
  51.     }
  52.     public function setType(QuotaAssignmentType $type): self
  53.     {
  54.         $this->type $type;
  55.         return $this;
  56.     }
  57.     public function getAmount(): ?float
  58.     {
  59.         return $this->amount;
  60.     }
  61.     public function setAmount(float $amount): self
  62.     {
  63.         $this->amount $amount;
  64.         return $this;
  65.     }
  66.     public function getAmountUnitType(): ?QuotaAssignmentAmountUnitType
  67.     {
  68.         return $this->amountUnitType;
  69.     }
  70.     public function setAmountUnitType(QuotaAssignmentAmountUnitType $amountUnitType): self
  71.     {
  72.         $this->amountUnitType $amountUnitType;
  73.         return $this;
  74.     }
  75.     public function getEffectiveStartPeriod(): ?Period
  76.     {
  77.         return $this->effectiveStartPeriod;
  78.     }
  79.     public function setEffectiveStartPeriod(?Period $effectiveStartPeriod): self
  80.     {
  81.         $this->effectiveStartPeriod $effectiveStartPeriod;
  82.         return $this;
  83.     }
  84.     public function getEffectiveEndPeriod(): ?Period
  85.     {
  86.         return $this->effectiveEndPeriod;
  87.     }
  88.     public function setEffectiveEndPeriod(?Period $effectiveEndPeriod): self
  89.     {
  90.         $this->effectiveEndPeriod $effectiveEndPeriod;
  91.         return $this;
  92.     }
  93.     public function getPosition(): ?Position
  94.     {
  95.         return $this->position;
  96.     }
  97.     public function setPosition(?Position $position): self
  98.     {
  99.         $this->position $position;
  100.         return $this;
  101.     }
  102.     public function getTitle(): ?Title
  103.     {
  104.         return $this->title;
  105.     }
  106.     public function setTitle(?Title $title): self
  107.     {
  108.         $this->title $title;
  109.         return $this;
  110.     }
  111.     public function getPeriod(): ?Period
  112.     {
  113.         return $this->period;
  114.     }
  115.     public function setPeriod(?Period $period): self
  116.     {
  117.         $this->period $period;
  118.         return $this;
  119.     }
  120. }