✨ feat(security): Utilise l'email pour l'authentification, crée dashboard admin.
Ajoute le dashboard admin, les membres, les events, et les comptes.
Utilise l'email au lieu du username pour l'authentification.
```
258 lines
5.3 KiB
PHP
258 lines
5.3 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\MembersRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Symfony\Component\HttpFoundation\File\File;
|
|
use Vich\UploaderBundle\Mapping\Annotation as Vich;
|
|
|
|
#[ORM\Entity(repositoryClass: MembersRepository::class)]
|
|
#[Vich\Uploadable()]
|
|
class Members
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\Column]
|
|
private ?int $id = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $pseudo = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $role = null;
|
|
|
|
#[ORM\Column]
|
|
private ?bool $cosplayer = null;
|
|
|
|
#[ORM\Column]
|
|
private ?bool $crosscosplayer = null;
|
|
|
|
#[ORM\Column]
|
|
private ?bool $trans = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $orientation = null;
|
|
|
|
#[Vich\UploadableField(mapping: 'members',fileNameProperty: 'memberFileName', size: 'memberSize', mimeType: 'memberMineType', originalName: 'memberOriginalName',dimensions: 'memberDimensions')]
|
|
private ?File $members = null;
|
|
|
|
#[ORM\Column(nullable: true)]
|
|
private ?string $memberFileName = null;
|
|
#[ORM\Column(nullable: true)]
|
|
private ?array $memberDimensions = [];
|
|
#[ORM\Column(length: 255,nullable: true)]
|
|
private ?string $memberSize = null;
|
|
#[ORM\Column(length: 255,nullable: true)]
|
|
private ?string $memberMineType = null;
|
|
#[ORM\Column(length: 255,nullable: true)]
|
|
private ?string $memberOriginalName = null;
|
|
#[ORM\Column(nullable: true)]
|
|
private ?\DateTimeImmutable $updateAt;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getPseudo(): ?string
|
|
{
|
|
return $this->pseudo;
|
|
}
|
|
|
|
public function setPseudo(string $pseudo): static
|
|
{
|
|
$this->pseudo = $pseudo;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getRole(): ?string
|
|
{
|
|
return $this->role;
|
|
}
|
|
|
|
public function setRole(string $role): static
|
|
{
|
|
$this->role = $role;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function isCosplayer(): ?bool
|
|
{
|
|
return $this->cosplayer;
|
|
}
|
|
|
|
public function setCosplayer(bool $cosplayer): static
|
|
{
|
|
$this->cosplayer = $cosplayer;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function isCrosscosplayer(): ?bool
|
|
{
|
|
return $this->crosscosplayer;
|
|
}
|
|
|
|
public function setCrosscosplayer(bool $crosscosplayer): static
|
|
{
|
|
$this->crosscosplayer = $crosscosplayer;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function isTrans(): ?bool
|
|
{
|
|
return $this->trans;
|
|
}
|
|
|
|
public function setTrans(bool $trans): static
|
|
{
|
|
$this->trans = $trans;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getOrientation(): ?string
|
|
{
|
|
return $this->orientation;
|
|
}
|
|
|
|
public function setOrientation(string $orientation): static
|
|
{
|
|
$this->orientation = $orientation;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return \DateTimeImmutable|null
|
|
*/
|
|
public function getUpdateAt(): ?\DateTimeImmutable
|
|
{
|
|
return $this->updateAt;
|
|
}
|
|
|
|
/**
|
|
* @return bool|null
|
|
*/
|
|
public function getCosplayer(): ?bool
|
|
{
|
|
return $this->cosplayer;
|
|
}
|
|
|
|
/**
|
|
* @return bool|null
|
|
*/
|
|
public function getCrosscosplayer(): ?bool
|
|
{
|
|
return $this->crosscosplayer;
|
|
}
|
|
|
|
/**
|
|
* @return array|null
|
|
*/
|
|
public function getMemberDimensions(): ?array
|
|
{
|
|
return $this->memberDimensions;
|
|
}
|
|
|
|
/**
|
|
* @return string|null
|
|
*/
|
|
public function getMemberFileName(): ?string
|
|
{
|
|
return $this->memberFileName;
|
|
}
|
|
|
|
/**
|
|
* @return string|null
|
|
*/
|
|
public function getMemberMineType(): ?string
|
|
{
|
|
return $this->memberMineType;
|
|
}
|
|
|
|
/**
|
|
* @return string|null
|
|
*/
|
|
public function getMemberOriginalName(): ?string
|
|
{
|
|
return $this->memberOriginalName;
|
|
}
|
|
|
|
/**
|
|
* @return File|null
|
|
*/
|
|
public function getMembers(): ?File
|
|
{
|
|
return $this->members;
|
|
}
|
|
|
|
/**
|
|
* @return string|null
|
|
*/
|
|
public function getMemberSize(): ?string
|
|
{
|
|
return $this->memberSize;
|
|
}
|
|
|
|
/**
|
|
* @param \DateTimeImmutable|null $updateAt
|
|
*/
|
|
public function setUpdateAt(?\DateTimeImmutable $updateAt): void
|
|
{
|
|
$this->updateAt = $updateAt;
|
|
}
|
|
|
|
/**
|
|
* @param array|null $memberDimensions
|
|
*/
|
|
public function setMemberDimensions(?array $memberDimensions): void
|
|
{
|
|
$this->memberDimensions = $memberDimensions;
|
|
}
|
|
|
|
/**
|
|
* @param File|null $members
|
|
*/
|
|
public function setMembers(?File $members): void
|
|
{
|
|
$this->members = $members;
|
|
}
|
|
|
|
/**
|
|
* @param string|null $memberFileName
|
|
*/
|
|
public function setMemberFileName(?string $memberFileName): void
|
|
{
|
|
$this->memberFileName = $memberFileName;
|
|
}
|
|
|
|
/**
|
|
* @param string|null $memberMineType
|
|
*/
|
|
public function setMemberMineType(?string $memberMineType): void
|
|
{
|
|
$this->memberMineType = $memberMineType;
|
|
}
|
|
|
|
/**
|
|
* @param string|null $memberOriginalName
|
|
*/
|
|
public function setMemberOriginalName(?string $memberOriginalName): void
|
|
{
|
|
$this->memberOriginalName = $memberOriginalName;
|
|
}
|
|
|
|
/**
|
|
* @param string|null $memberSize
|
|
*/
|
|
public function setMemberSize(?string $memberSize): void
|
|
{
|
|
$this->memberSize = $memberSize;
|
|
}
|
|
}
|