add db and fixtures

This commit is contained in:
Tykayn 2025-05-26 11:32:53 +02:00 committed by tykayn
parent 03f53f4688
commit 528ebb672a
20 changed files with 1655 additions and 116 deletions

71
src/Entity/History.php Normal file
View file

@ -0,0 +1,71 @@
<?php
namespace App\Entity;
use App\Repository\HistoryRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: HistoryRepository::class)]
class History
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(type: Types::SMALLINT, nullable: true)]
private ?int $completion_percent = null;
#[ORM\Column]
private ?\DateTime $date_time = null;
#[ORM\ManyToOne(inversedBy: 'histories')]
#[ORM\JoinColumn(nullable: false)]
private ?Place $place_id = null;
public function getId(): ?int
{
return $this->id;
}
public function getCompletionPercent(): ?int
{
return $this->completion_percent;
}
public function setCompletionPercent(?int $completion_percent): static
{
$this->completion_percent = $completion_percent;
return $this;
}
public function getDateTime(): ?\DateTime
{
return $this->date_time;
}
public function setDateTime(\DateTime $date_time): static
{
$this->date_time = $date_time;
return $this;
}
public function getPlaceId(): ?Place
{
return $this->place_id;
}
public function setPlaceId(?Place $place_id): static
{
$this->place_id = $place_id;
return $this;
}
}