src/Flexy/ShopBundle/Entity/Accounting/JournalEntryItem.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\JournalEntryItemRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClass: JournalEntryItemRepository::class)]
  8. #[ApiResource]
  9. class JournalEntryItem
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id = null;
  15.     #[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
  16.     private ?\DateTimeInterface $createdAt = null;
  17.     #[ORM\Column(type: Types::TEXT, nullable: true)]
  18.     private ?string $description = null;
  19.     #[ORM\ManyToOne(inversedBy: 'journalEntryItems')]
  20.     #[ORM\JoinColumn(nullable: false)]
  21.     private ?JournalEntry $journalEntry = null;
  22.     public function getId(): ?int
  23.     {
  24.         return $this->id;
  25.     }
  26.     public function getCreatedAt(): ?\DateTimeInterface
  27.     {
  28.         return $this->createdAt;
  29.     }
  30.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  31.     {
  32.         $this->createdAt = $createdAt;
  33.         return $this;
  34.     }
  35.     public function getDescription(): ?string
  36.     {
  37.         return $this->description;
  38.     }
  39.     public function setDescription(?string $description): self
  40.     {
  41.         $this->description = $description;
  42.         return $this;
  43.     }
  44.     public function getJournalEntry(): ?JournalEntry
  45.     {
  46.         return $this->journalEntry;
  47.     }
  48.     public function setJournalEntry(?JournalEntry $journalEntry): self
  49.     {
  50.         $this->journalEntry = $journalEntry;
  51.         return $this;
  52.     }
  53. }