<?php
namespace App\Entity;
use App\Repository\SignUpRepository;
use App\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* @ORM\Table(name="cardex_pro")
* @ORM\Entity(repositoryClass=SignUpRepository::class)
* @UniqueEntity(fields="email", message="Cet email n'est pas disponible.")
*/
class SignUp implements UserInterface
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=500, nullable=true)
*/
private $customer_id;
/**
* @ORM\Column(type="integer", options={"default" : 0})
*/
private $stripe_card;
/**
* @ORM\Column(type="string", length=500)
*/
private $hash_pro;
/**
* @ORM\Column(type="integer", options={"default": 0})
*/
private $trial_period;
/**
* @ORM\Column(type="string", length=255)
*/
private $compagnie_name;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $telephone;
/**
* @Assert\EmailRequirements()
* @ORM\Column(type="string", length=255, unique=true)
*/
private $email;
/**
* @ORM\Column(type="string", length=255, options={"default": "M."})
*/
private $civilite_responsable;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $nom_responsable;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $prenom_responsable;
/**
* @ORM\Column(type="string", length=255)
*/
private $code_activation;
/**
* @ORM\Column(type="json")
*/
private $roles = [];
/**
* @Assert\PasswordRequirements()
* @ORM\Column(type="string", length=255)
*/
private $mdpt;
/**
* @ORM\Column(type="integer", options={"default" : 0})
*/
private $visite;
/**
* @ORM\Column(type="integer", options={"default" : 0})
*/
private $statut;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $forme_juridique;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $payment_choice;
public function getId(): ?int
{
return $this->id;
}
public function getCustomerId(): ?string
{
return $this->customer_id;
}
public function setCustomerId(?string $customer_id): self
{
$this->customer_id = $customer_id;
return $this;
}
public function getStripeCard(): ?int
{
return $this->stripe_card;
}
public function setStripeCard(int $stripe_card): self
{
$this->stripe_card = $stripe_card;
return $this;
}
public function getHashPro(): ?string
{
return $this->hash_pro;
}
public function setHashPro(string $hash_pro): self
{
$this->hash_pro = $hash_pro;
return $this;
}
public function getTrialPeriod(): ?int
{
return $this->trial_period;
}
public function setTrialPeriod(int $trial_period): self
{
$this->trial_period = $trial_period;
return $this;
}
public function getCompagnieName(): ?string
{
return $this->compagnie_name;
}
public function setCompagnieName(string $compagnie_name): self
{
$this->compagnie_name = $compagnie_name;
return $this;
}
public function getTelephone(): ?string
{
return $this->telephone;
}
public function setTelephone(?string $telephone): self
{
$this->telephone = $telephone;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
public function getCiviliteResponsable(): ?string
{
return $this->civilite_responsable;
}
public function setCiviliteResponsable(string $civilite_responsable): self
{
$this->civilite_responsable = $civilite_responsable;
return $this;
}
public function getNomResponsable(): ?string
{
return $this->nom_responsable;
}
public function setNomResponsable(?string $nom_responsable): self
{
$this->nom_responsable = $nom_responsable;
return $this;
}
public function getPrenomResponsable(): ?string
{
return $this->prenom_responsable;
}
public function setPrenomResponsable(?string $prenom_responsable): self
{
$this->prenom_responsable = $prenom_responsable;
return $this;
}
public function getCodeActivation(): ?string
{
return $this->code_activation;
}
public function setCodeActivation(string $code_activation): self
{
$this->code_activation = $code_activation;
return $this;
}
public function getMdpt(): ?string
{
return $this->mdpt;
}
public function setMdpt(string $mdpt): self
{
$this->mdpt = $mdpt;
return $this;
}
public function getPassword(): ?string
{
return $this->mdpt;
}
public function setPassword(string $mdpt): self
{
$this->mdpt = $mdpt;
return $this;
}
/**
* The public representation of the user (e.g. a username, an email address, etc.)
*
* @see UserInterface
*/
public function getUserIdentifier(): string
{
return (string) $this->email;
}
/**
* @deprecated since Symfony 5.3
*/
public function getUsername(): string
{
return (string) $this->email;
}
/**
* @see UserInterface
*/
public function getRoles(): array
{
$roles = $this->roles;
// guarantee every user at least has ROLE_USER
$roles[] = 'ROLE_USER';
return array_unique($roles);
}
public function setRoles(array $roles): self
{
$this->roles = $roles;
return $this;
}
/**
* Returning a salt is only needed if you are not using a modern
* hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
*
* @see UserInterface
*/
public function getSalt(): ?string
{
return null;
}
/**
* @see UserInterface
*/
public function eraseCredentials()
{
// If you store any temporary, sensitive data on the user, clear it here
// $this->plainPassword = null;
}
public function getVisite(): ?int
{
return $this->visite;
}
public function setVisite(int $visite): self
{
$this->visite = $visite;
return $this;
}
public function getStatut(): ?int
{
return $this->statut;
}
public function setStatut(int $statut): self
{
$this->statut = $statut;
return $this;
}
public function getFormeJuridique(): ?string
{
return $this->forme_juridique;
}
public function setFormeJuridique(?string $forme_juridique): self
{
$this->forme_juridique = $forme_juridique;
return $this;
}
public function getPaymentChoice(): ?int
{
return $this->payment_choice;
}
public function setPaymentChoice(?int $payment_choice): self
{
$this->payment_choice = $payment_choice;
return $this;
}
}