src/Entity/Donation.php line 11
<?phpnamespace App\Entity;use App\Repository\DonationRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: DonationRepository::class)]#[ORM\HasLifecycleCallbacks]class Donation{public const STATUS_ACTIVE = 'AC';public const STATUS_INACTIVE = 'IN';public const STATUS_PENDING = 'PE';#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\ManyToOne(inversedBy: 'donations')]private ?User $user = null;#[ORM\Column(length: 255)]private ?string $firstName = null;#[ORM\Column(length: 255, nullable: true)]private ?string $lastName = null;#[ORM\Column(length: 255)]private ?string $email = null;#[ORM\Column]private ?int $amount = null;#[ORM\Column(length: 255, nullable: true)]private ?string $phoneNumber = null;#[ORM\Column(length: 255)]private ?string $address = null;#[ORM\Column(length: 2)]private ?string $donationStatus = null;#[ORM\Column(type: Types::DATETIME_MUTABLE)]private ?\DateTimeInterface $created = null;#[ORM\Column(type: Types::DATETIME_MUTABLE)]private ?\DateTimeInterface $updated = null;#[ORM\Column(nullable: true)]private ?int $updatedBy = null;public function getId(): ?int{return $this->id;}public function getUser(): ?User{return $this->user;}public function setUser(?User $user): static{$this->user = $user;return $this;}public function getFirstName(): ?string{return $this->firstName;}public function setFirstName(string $firstName): static{$this->firstName = $firstName;return $this;}public function getLastName(): ?string{return $this->lastName;}public function setLastName(?string $lastName): static{$this->lastName = $lastName;return $this;}public function getEmail(): ?string{return $this->email;}public function setEmail(string $email): static{$this->email = $email;return $this;}public function getPhoneNumber(): ?string{return $this->phoneNumber;}public function setPhoneNumber(?string $phoneNumber): static{$this->phoneNumber = $phoneNumber;return $this;}public function getAddress(): ?string{return $this->address;}public function setAddress(string $address): static{$this->address = $address;return $this;}public function getDonationStatus(): ?string{return $this->donationStatus;}public function setDonationStatus(string $donationStatus): static{$this->donationStatus = $donationStatus;return $this;}public function getCreated(): ?\DateTimeInterface{return $this->created;}#[ORM\PrePersist]public function setCreatedTimestamp(): void{$this->created = new \DateTime();}public function setCreated(\DateTimeInterface $created): static{$this->created = $created;return $this;}#[ORM\PrePersist]#[ORM\PreUpdate]public function setUpdatedTimestamp(): void{$this->updated = new \DateTime();}public function getUpdated(): ?\DateTimeInterface{return $this->updated;}public function setUpdated(\DateTimeInterface $updated): static{$this->updated = $updated;return $this;}public function getUpdatedBy(): ?int{return $this->updatedBy;}public function setUpdatedBy(?int $updatedBy): static{$this->updatedBy = $updatedBy;return $this;}public function getAmount(): ?int{return $this->amount;}public function setAmount(?int $amount): void{$this->amount = $amount;}}