Add Document and Bibliography
This commit is contained in:
83
src/Entity/Bibliography.php
Normal file
83
src/Entity/Bibliography.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\BibliographyRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: BibliographyRepository::class)]
|
||||
#[ORM\Table('bibliografia')]
|
||||
class Bibliography implements \JsonSerializable
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(name: 'citazione', length: 255)]
|
||||
private ?string $citation = null;
|
||||
|
||||
#[ORM\Column(name: 'riferimento', length: 400, nullable: true)]
|
||||
private ?string $reference = null;
|
||||
|
||||
#[ORM\Column(name: 'pagine', length: 20, nullable: true)]
|
||||
private ?string $pages = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setId(string $id): static
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCitation(): ?string
|
||||
{
|
||||
return $this->citation;
|
||||
}
|
||||
|
||||
public function setCitation(string $citation): static
|
||||
{
|
||||
$this->citation = $citation;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getReference(): ?string
|
||||
{
|
||||
return $this->reference;
|
||||
}
|
||||
|
||||
public function setReference(?string $reference): static
|
||||
{
|
||||
$this->reference = $reference;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getPages(): ?string
|
||||
{
|
||||
return $this->pages;
|
||||
}
|
||||
|
||||
public function setPages(?string $pages): static
|
||||
{
|
||||
$this->pages = $pages;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function jsonSerialize(): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'citation' => $this->citation,
|
||||
'reference' => $this->reference,
|
||||
'pages' => $this->pages,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user