<?phpnamespace App\Entity;use App\Repository\AgencyAccountTypeRepository;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: AgencyAccountTypeRepository::class)]#[ORM\Table(name: 'tb_agencies_accounts_types')]#[ORM\HasLifecycleCallbacks]class AgencyAccountType{ #[ORM\Id] #[ORM\Column(type: "string", unique: true)] private ?string $id; #[ORM\Column(type: 'string', length: 50, nullable: false)] private ?string $name; #[ORM\Column(type: 'integer', nullable: false)] private ?int $type; #[ORM\Column(type: 'datetime', nullable: false)] private \DateTimeInterface $createdAt; #[ORM\Column(type: 'datetime', nullable: false)] private ?\DateTimeInterface $modifiedAt; #[ORM\Column(type: 'boolean', nullable: false)] private bool $activated; #[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'agencyAccountTypes')] private ?User $createdBy; public function __construct() { $this->createdAt = new \DateTime(); $this->activated = true; } public function getId(): ?string { return $this->id; } public function setId(string $id): self { $this->id = $id; return $this; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getType(): ?int { return $this->type; } public function setType(int $type): self { $this->type = $type; return $this; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getModifiedAt(): ?\DateTimeInterface { return $this->modifiedAt; } public function setModifiedAt(?\DateTimeInterface $modifiedAt): self { $this->modifiedAt = $modifiedAt; return $this; } public function getActivated(): ?bool { return $this->activated; } public function setActivated(?bool $activated): self { $this->activated = $activated; return $this; } public function getCreatedBy(): ?User { return $this->createdBy; } public function setCreatedBy(?User $createdBy): self { $this->createdBy = $createdBy; return $this; } /** * @ORM\PreUpdate */ public function onUpdate() { $this->modifiedAt = new \DateTime(); }}