src/Flexy/ShopBundle/Entity/Accounting/Account.php line 12

  1. <?php
  2. namespace App\Flexy\ShopBundle\Entity\Accounting;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\Flexy\ShopBundle\Entity\Accounting\AccountRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassAccountRepository::class)]
  8. #[ApiResource]
  9. class Account
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $name null;
  17.     #[ORM\Column(length255)]
  18.     private ?int $code null;
  19.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  20.     private ?string $description null;
  21.     #[ORM\ManyToOne(inversedBy'accountes')]
  22.     #[ORM\JoinColumn(nullablefalse)]
  23.     private ?AccountClass $accountClass null;
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getName(): ?string
  29.     {
  30.         return $this->name;
  31.     }
  32.     public function setName(string $name): self
  33.     {
  34.         $this->name $name;
  35.         return $this;
  36.     }
  37.     public function getCode(): ?int
  38.     {
  39.         return $this->code;
  40.     }
  41.     public function setCode(int $code): self
  42.     {
  43.         $this->code $code;
  44.         return $this;
  45.     }
  46.     public function getDescription(): ?string
  47.     {
  48.         return $this->description;
  49.     }
  50.     public function setDescription(?string $description): self
  51.     {
  52.         $this->description $description;
  53.         return $this;
  54.     }
  55.     public function getAccountClass(): ?AccountClass
  56.     {
  57.         return $this->accountClass;
  58.     }
  59.     public function setAccountClass(?AccountClass $accountClass): self
  60.     {
  61.         $this->accountClass $accountClass;
  62.         return $this;
  63.     }
  64. }