src/Flexy/ShopBundle/Entity/Accounting/FinancialPeriod.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\FinancialPeriodRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassFinancialPeriodRepository::class)]
  8. #[ApiResource]
  9. class FinancialPeriod
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  16.     private ?string $description null;
  17.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  18.     private ?\DateTimeInterface $startAt null;
  19.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  20.     private ?\DateTimeInterface $endAt null;
  21.     #[ORM\ManyToOne(inversedBy'financialPeriods')]
  22.     #[ORM\JoinColumn(nullablefalse)]
  23.     private ?FinancialYear $financialYear null;
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getDescription(): ?string
  29.     {
  30.         return $this->description;
  31.     }
  32.     public function setDescription(?string $description): self
  33.     {
  34.         $this->description $description;
  35.         return $this;
  36.     }
  37.     public function getStartAt(): ?\DateTimeInterface
  38.     {
  39.         return $this->startAt;
  40.     }
  41.     public function setStartAt(\DateTimeInterface $startAt): self
  42.     {
  43.         $this->startAt $startAt;
  44.         return $this;
  45.     }
  46.     public function getEndAt(): ?\DateTimeInterface
  47.     {
  48.         return $this->endAt;
  49.     }
  50.     public function setEndAt(\DateTimeInterface $endAt): self
  51.     {
  52.         $this->endAt $endAt;
  53.         return $this;
  54.     }
  55.     public function getFinancialYear(): ?FinancialYear
  56.     {
  57.         return $this->financialYear;
  58.     }
  59.     public function setFinancialYear(?FinancialYear $financialYear): self
  60.     {
  61.         $this->financialYear $financialYear;
  62.         return $this;
  63.     }
  64. }