src/IlaveU/ShopBundle/Entity/Payment/BankBook.php line 14
<?phpnamespace App\IlaveU\ShopBundle\Entity\Payment;use ApiPlatform\Metadata\ApiResource;use App\Repository\IlaveU\ShopBundle\Entity\Payment\BankBookRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: BankBookRepository::class)]#[ApiResource]class BankBook{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column]private ?int $reference = null;#[ORM\Column]private ?int $nbrPages = null;#[ORM\Column(length: 255)]private ?string $type = null;#[ORM\Column(type: Types::DATETIME_MUTABLE)]private ?\DateTimeInterface $createdAt = null;#[ORM\Column(length: 255, nullable: true)]private ?string $createdBy = null;#[ORM\Column(length: 255, nullable: true)]private ?string $updatedBy = null;#[ORM\OneToMany(mappedBy: 'bankBook', targetEntity: BankBookItem::class)]private Collection $bankBookItems;public function __construct(){$this->bankBookItems = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getReference(): ?int{return $this->reference;}public function setReference(int $reference): self{$this->reference = $reference;return $this;}public function getNbrPages(): ?int{return $this->nbrPages;}public function setNbrPages(int $nbrPages): self{$this->nbrPages = $nbrPages;return $this;}public function getType(): ?string{return $this->type;}public function setType(string $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 getCreatedBy(): ?string{return $this->createdBy;}public function setCreatedBy(?string $createdBy): self{$this->createdBy = $createdBy;return $this;}public function getUpdatedBy(): ?string{return $this->updatedBy;}public function setUpdatedBy(?string $updatedBy): self{$this->updatedBy = $updatedBy;return $this;}/*** @return Collection<int, BankBookItem>*/public function getBankBookItems(): Collection{return $this->bankBookItems;}public function addBankBookItem(BankBookItem $bankBookItem): self{if (!$this->bankBookItems->contains($bankBookItem)) {$this->bankBookItems->add($bankBookItem);$bankBookItem->setBankBook($this);}return $this;}public function removeBankBookItem(BankBookItem $bankBookItem): self{if ($this->bankBookItems->removeElement($bankBookItem)) {// set the owning side to null (unless already changed)if ($bankBookItem->getBankBook() === $this) {$bankBookItem->setBankBook(null);}}return $this;}}