src/Entity/PartyPillar.php line 11

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PartyPillarRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassPartyPillarRepository::class)]
  7. #[ORM\HasLifecycleCallbacks]
  8. class PartyPillar
  9. {
  10.     public const STATUS_ACTIVE 'AC';
  11.     public const STATUS_INACTIVE 'IN';
  12.     public const STATUS_PENDING 'PE';
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $firstName null;
  19.     #[ORM\Column(length255)]
  20.     private ?string $lastName null;
  21.     #[ORM\Column(length255)]
  22.     private ?string $email null;
  23.     #[ORM\Column(length15nullabletrue)]
  24.     private ?string $phoneNumber null;
  25.     #[ORM\Column(length255nullabletrue)]
  26.     private ?string $address null;
  27.     #[ORM\ManyToOne(inversedBy'partyPillars')]
  28.     private ?User $user null;
  29.     #[ORM\Column(length2)]
  30.     private ?string $partyPillarStatus null;
  31.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  32.     private ?\DateTimeInterface $created null;
  33.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  34.     private ?\DateTimeInterface $updated null;
  35.     #[ORM\Column]
  36.     private ?int $updatedBy null;
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getFirstName(): ?string
  42.     {
  43.         return $this->firstName;
  44.     }
  45.     public function setFirstName(string $firstName): static
  46.     {
  47.         $this->firstName $firstName;
  48.         return $this;
  49.     }
  50.     public function getLastName(): ?string
  51.     {
  52.         return $this->lastName;
  53.     }
  54.     public function setLastName(string $lastName): static
  55.     {
  56.         $this->lastName $lastName;
  57.         return $this;
  58.     }
  59.     public function getEmail(): ?string
  60.     {
  61.         return $this->email;
  62.     }
  63.     public function setEmail(string $email): static
  64.     {
  65.         $this->email $email;
  66.         return $this;
  67.     }
  68.     public function getPhoneNumber(): ?string
  69.     {
  70.         return $this->phoneNumber;
  71.     }
  72.     public function setPhoneNumber(?string $phoneNumber): static
  73.     {
  74.         $this->phoneNumber $phoneNumber;
  75.         return $this;
  76.     }
  77.     public function getAddress(): ?string
  78.     {
  79.         return $this->address;
  80.     }
  81.     public function setAddress(?string $address): static
  82.     {
  83.         $this->address $address;
  84.         return $this;
  85.     }
  86.     public function getUser(): ?User
  87.     {
  88.         return $this->user;
  89.     }
  90.     public function setUser(?User $user): static
  91.     {
  92.         $this->user $user;
  93.         return $this;
  94.     }
  95.     public function getPartyPillarStatus(): ?string
  96.     {
  97.         return $this->partyPillarStatus;
  98.     }
  99.     public function setPartyPillarStatus(string $partyPillarStatus): static
  100.     {
  101.         $this->partyPillarStatus $partyPillarStatus;
  102.         return $this;
  103.     }
  104.     public function getUpdated(): ?\DateTimeInterface
  105.     {
  106.         return $this->updated;
  107.     }
  108.     #[ORM\PrePersist]
  109.     #[ORM\PreUpdate]
  110.     public function setUpdatedTimestamp(): void
  111.     {
  112.         $this->updated = new \DateTime();
  113.     }
  114.     public function setUpdated(\DateTimeInterface $updated): static
  115.     {
  116.         $this->updated $updated;
  117.         return $this;
  118.     }
  119.     public function getCreated(): ?\DateTimeInterface
  120.     {
  121.         return $this->created;
  122.     }
  123.     #[ORM\PrePersist]
  124.     public function setCreatedTimestamp(): void
  125.     {
  126.         $this->created = new \DateTime();
  127.     }
  128.     public function setCreated(\DateTimeInterface $created): static
  129.     {
  130.         $this->created $created;
  131.         return $this;
  132.     }
  133.     public function getUpdatedBy(): ?int
  134.     {
  135.         return $this->updatedBy;
  136.     }
  137.     public function setUpdatedBy(int $updatedBy): static
  138.     {
  139.         $this->updatedBy $updatedBy;
  140.         return $this;
  141.     }
  142. }