This commit is contained in:
2024-12-24 17:29:37 +01:00
parent e0aa499940
commit 4c08435bd8
115 changed files with 3613 additions and 152 deletions

View File

@ -8,6 +8,7 @@ use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: CompanyRepository::class)]
#[ORM\UniqueConstraint(name: 'UNIQ_IDENTIFIER_COMPANY', fields: ['title'])]
@ -22,12 +23,16 @@ class Company
#[ORM\Column(length: 255, unique: true)]
private ?string $title = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $adress = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $logo = null;
#[ORM\Column(length: 255, nullable: true)]
#[Assert\Email(message: 'Veuillez entrer un email valide.')]
private ?string $email = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $adress = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $bankname = null;
@ -87,6 +92,30 @@ class Company
return $this;
}
public function getLogo(): ?string
{
return $this->logo ? $this->logo : 'medias/logo/logo.png';
}
public function setLogo(?string $logo): static
{
$this->logo = $logo;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): static
{
$this->email = $email;
return $this;
}
public function getAdress(): ?string
{
return $this->adress;
@ -99,18 +128,6 @@ class Company
return $this;
}
public function getLogo(): ?string
{
return $this->logo;
}
public function setLogo(?string $logo): static
{
$this->logo = $logo;
return $this;
}
public function getBankname(): ?string
{
return $this->bankname;