src/Entity/FrequentlyUsedAccount.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FrequentlyUsedAccountRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassFrequentlyUsedAccountRepository::class)]
  6. #[ORM\Table(name'tb_frequently_used_accounts')]
  7. #[ORM\HasLifecycleCallbacks]
  8. class FrequentlyUsedAccount
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type"integer"uniquetrue)]
  13.     private ?int $id;
  14.     #[ORM\Column(type'string'length50nullablefalse)]
  15.     private ?string $code;
  16.     #[ORM\Column(type'string'length50nullablefalse)]
  17.     private ?string $compte;
  18.     #[ORM\Column(type'integer'nullablefalse)]
  19.     private ?int $type;
  20.     #[ORM\ManyToOne(targetEntityAppAccount::class, inversedBy'frequentlyUsedAccounts')]
  21.     #[ORM\JoinColumn(nullablefalse)]
  22.     private ?AppAccount $account;
  23.     #[ORM\Column(type'datetime'nullabletrue)]
  24.     private \DateTimeInterface $createdAt;
  25.     #[ORM\Column(type'boolean'nullabletrue)]
  26.     private bool $activated;
  27.     public function __construct()
  28.     {
  29.         $this->createdAt = new \DateTime();
  30.         $this->activated true;
  31.     }
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getCode(): ?string
  37.     {
  38.         return $this->code;
  39.     }
  40.     public function setCode(string $code): self
  41.     {
  42.         $this->code $code;
  43.         return $this;
  44.     }
  45.     public function getCompte(): ?string
  46.     {
  47.         return $this->compte;
  48.     }
  49.     public function setCompte(string $compte): self
  50.     {
  51.         $this->compte $compte;
  52.         return $this;
  53.     }
  54.     public function getType(): ?int
  55.     {
  56.         return $this->type;
  57.     }
  58.     public function setType(int $type): self
  59.     {
  60.         $this->type $type;
  61.         return $this;
  62.     }
  63.     public function getAccount(): ?AppAccount
  64.     {
  65.         return $this->account;
  66.     }
  67.     public function setAccount(?AppAccount $account): self
  68.     {
  69.         $this->account $account;
  70.         return $this;
  71.     }
  72.     public function getCreatedAt(): ?\DateTimeInterface
  73.     {
  74.         return $this->createdAt;
  75.     }
  76.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  77.     {
  78.         $this->createdAt $createdAt;
  79.         return $this;
  80.     }
  81.     public function getActivated(): ?bool
  82.     {
  83.         return $this->activated;
  84.     }
  85.     public function setActivated(?bool $activated): self
  86.     {
  87.         $this->activated $activated;
  88.         return $this;
  89.     }
  90. }