arcoa/src/Entity/Bibliography.php

173 lines
3.7 KiB
PHP

<?php
namespace App\Entity;
use App\Repository\BibliographyRepository;
use DateTimeImmutable;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\DBAL\Types\Types;
use App\RecordStatus;
use Doctrine\Common\Collections\Collection as DoctrineCollection;
#[ORM\Entity(repositoryClass: BibliographyRepository::class)]
#[ORM\Table(name: 'bibliography')]
class Bibliography
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(name: 'id')]
private ?int $id = null;
#[ORM\Column(name: 'stato')]
private ?int $status = null;
#[ORM\Column(name: 'modif')]
private ?DateTimeImmutable $modifiedAt = null;
#[ORM\Column(name: 'cit_bib', type: Types::TEXT)]
private ?string $citation = null;
#[ORM\Column(name: 'rif_bib', type: Types::TEXT)]
private ?string $reference = null;
#[ORM\Column(name: 'resp', length: 100)]
private ?string $owner = null;
#[ORM\Column(name: 'note_bib', type: Types::TEXT)]
private ?string $notes = null;
#[ORM\Column(length: 100, name: 'editor')]
private ?string $editor = null;
#[ORM\Column(length: 100, name: 'creator')]
private ?string $creator = null;
#[ORM\JoinTable(name: 'rel_riferimento_collezione')]
#[ORM\JoinColumn(name: 'Bibliografia_id_bib', referencedColumnName: 'id')]
#[ORM\InverseJoinColumn(name: 'Collezione_id_coll', referencedColumnName: 'id')]
#[ORM\ManyToMany(targetEntity: Collection::class, inversedBy: 'bibliography')]
private DoctrineCollection $collections;
private DoctrineCollection $documents;
private DoctrineCollection $objects;
private DoctrineCollection $persons;
private DoctrineCollection $sites;
public function getId(): ?int
{
return $this->id;
}
public function getStatus(): ?string
{
$status = RecordStatus::tryFrom($this->status);
return $status->toString();
}
public function setStatus(int $status): static
{
$this->status = $status;
return $this;
}
public function getModifiedAt(): ?DateTimeImmutable
{
return $this->modifiedAt;
}
public function setModifiedAt(DateTimeImmutable $modifiedAt): static
{
$this->modifiedAt = $modifiedAt;
return $this;
}
public function getOwner(): ?string
{
return $this->owner;
}
public function setOwner(string $owner): static
{
$this->owner = $owner;
return $this;
}
public function getEditor(): ?string
{
return $this->editor;
}
public function setEditor(string $editor): static
{
$this->editor = $editor;
return $this;
}
public function getCreator(): ?string
{
return $this->creator;
}
public function setCreator(string $creator): static
{
$this->creator = $creator;
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 getNotes(): ?string
{
return $this->notes;
}
public function setNotes(string $notes): static
{
$this->notes = $notes;
return $this;
}
public function getCollections(): ?DoctrineCollection
{
return $this->collections;
}
public function setCollections(DoctrineCollection $collections): static
{
$this->collections = $collections;
return $this;
}
}