Draft record view (bibliography)

This commit is contained in:
2024-10-31 10:24:28 +01:00
parent a5b7069679
commit 6b0fbce7ee
8 changed files with 287 additions and 2 deletions

134
src/Entity/Bibliography.php Normal file
View File

@@ -0,0 +1,134 @@
<?php
namespace App\Entity;
//use App\Repository\UserRepository;
use DateTimeImmutable;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\DBAL\Types\Types;
use App\RecordStatus;
#[ORM\Entity()]
#[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)]
private ?string $editor = null;
#[ORM\Column(length: 100)]
private ?string $creator = null;
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 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;
}
}