src/Entity/ManualPayment.php line 12
<?phpnamespace App\Entity;use App\Enum\Currency;use App\Repository\ManualPaymentRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Gedmo\Timestampable\Traits\TimestampableEntity;#[ORM\Entity(repositoryClass: ManualPaymentRepository::class)]class ManualPayment{use TimestampableEntity;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\OneToOne(mappedBy: 'manualPayment', cascade: ['persist', 'remove'])]private ?AggregatedTrueUp $aggregatedTrueUp = null;#[ORM\ManyToOne(inversedBy: 'manualPayments', fetch: 'EAGER')]private ?User $user = null;#[ORM\Column]private ?float $amount = null;#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]private ?\DateTimeInterface $incentiveDate = null;#[ORM\Column(length: 255)]private ?Currency $currency = Currency::USD;#[ORM\ManyToOne(inversedBy: 'manualPayments', fetch: 'EAGER')]private ?ReasonCode $reasonCode = null;#[ORM\ManyToOne(inversedBy: 'manualPayments', fetch: 'EAGER')]private ?EarningGroup $earningGroup = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $note = null;public function __construct(){$this->incentiveDate = new \DateTime();}public function getId(): ?int{return $this->id;}public function setAggregatedTrueUp(?AggregatedTrueUp $aggregatedTrueUp): self{// unset the owning side of the relation if necessaryif ($aggregatedTrueUp === null && $this->aggregatedTrueUp !== null) {$this->aggregatedTrueUp->setManualPayment(null);}// set the owning side of the relation if necessaryif ($aggregatedTrueUp !== null && $aggregatedTrueUp->getManualPayment() !== $this) {$aggregatedTrueUp->setManualPayment($this);}$this->aggregatedTrueUp = $aggregatedTrueUp;return $this;}public function getUser(): ?User{return $this->user;}public function setUser(?User $user): static{$this->user = $user;return $this;}public function getAmount(): ?float{return $this->amount;}public function setAmount(float $amount): static{$this->amount = $amount;return $this;}public function getIncentiveDate(): ?\DateTimeInterface{return $this->incentiveDate;}public function setIncentiveDate(?\DateTimeInterface $incentiveDate): static{$this->incentiveDate = $incentiveDate;return $this;}public function getCurrency(): ?Currency{return $this->currency;}public function setCurrency(Currency $currency): static{$this->currency = $currency;return $this;}public function getReasonCode(): ?ReasonCode{return $this->reasonCode;}public function setReasonCode(?ReasonCode $reasonCode): static{$this->reasonCode = $reasonCode;return $this;}public function getEarningGroup(): ?EarningGroup{return $this->earningGroup;}public function setEarningGroup(?EarningGroup $earningGroup): static{$this->earningGroup = $earningGroup;return $this;}public function getNote(): ?string{return $this->note;}public function setNote(?string $note): static{$this->note = $note;return $this;}}