mirror of
https://forge.chapril.org/tykayn/caisse-bliss
synced 2025-06-20 01:44:42 +02:00
up schema
This commit is contained in:
parent
17e7fce7f8
commit
8e2da4f159
20 changed files with 879 additions and 4 deletions
|
@ -21,6 +21,10 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
|||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
|
||||
#[ORM\Column(length: 255, nullable: true)]
|
||||
private ?string $name = null;
|
||||
|
||||
#[ORM\Column(length: 180)]
|
||||
private ?string $email = null;
|
||||
|
||||
|
@ -39,9 +43,14 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
|||
#[ORM\Column]
|
||||
private bool $isVerified = false;
|
||||
|
||||
|
||||
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
|
||||
private ?\DateTimeInterface $last_login = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'users')]
|
||||
private ?Festival $currentFestival = null;
|
||||
|
||||
|
||||
/**
|
||||
* @var Collection<int, Expense>
|
||||
*/
|
||||
|
@ -72,6 +81,13 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
|||
#[ORM\OneToMany(targetEntity: Category::class, mappedBy: 'user')]
|
||||
private Collection $categories;
|
||||
|
||||
/**
|
||||
* @var Collection<int, SerieFestival>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: SerieFestival::class, mappedBy: 'user')]
|
||||
private Collection $seriesFestival;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->expenses = new ArrayCollection();
|
||||
|
@ -79,6 +95,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
|||
$this->groupOfProducts = new ArrayCollection();
|
||||
$this->festivals = new ArrayCollection();
|
||||
$this->categories = new ArrayCollection();
|
||||
$this->seriesFestival = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
|
@ -345,4 +362,60 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
|||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, SerieFestival>
|
||||
*/
|
||||
public function getSeriesFestival(): Collection
|
||||
{
|
||||
return $this->seriesFestival;
|
||||
}
|
||||
|
||||
public function addSeriesFestival(SerieFestival $seriesFestival): static
|
||||
{
|
||||
if (!$this->seriesFestival->contains($seriesFestival)) {
|
||||
$this->seriesFestival->add($seriesFestival);
|
||||
$seriesFestival->setUser($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeSeriesFestival(SerieFestival $seriesFestival): static
|
||||
{
|
||||
if ($this->seriesFestival->removeElement($seriesFestival)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($seriesFestival->getUser() === $this) {
|
||||
$seriesFestival->setUser(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
public function getLastLogin(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->last_login;
|
||||
}
|
||||
|
||||
public function setLastLogin(?\DateTimeInterface $last_login): static
|
||||
{
|
||||
$this->last_login = $last_login;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setName(?string $name): static
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue