<?php
namespace App\Entity;
use App\Repository\UtilisateurRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* @Description
* la validation de email unique est geré par un custom validator, UN EMAIL existe deja n'est pas bloquant si modeutilisateur < > "inscrit"
*/
/**
* @ORM\Entity(repositoryClass=UtilisateurRepository::class)
* @ORM\Table(name="fusacq_dbo.utilisateurs")
*/
class Utilisateur implements UserInterface, PasswordAuthenticatedUserInterface {
public const MODE_UTILISATEUR_INSCRIT = 'inscrit';
public const MODE_UTILISATEUR_PROSPECT = 'prospect';
public const MODE_UTILISATEUR_SUPPRIME = 'supprime';
public const MODE_UTILISATEUR_DEMANDE_INSCRIPTION = 'demande_inscription';
public const INSCRIPTION_VALIDE_OUI = 'oui';
public const INSCRIPTION_VALIDE_NON = 'non';
public const TYPE_UTILISATEUR = [
'repreneur' => "Repreneur (personne physique)",
'acquereur' => 'Acquéreur (société)',
'cedant' => 'Cédant',
'autre' => 'Autre',
'investisseur' => 'Investisseur',
'franchiseur' => 'Franchiseur',
'expert' => 'Expert'
];
public const CONNEXION_KEY = 'email_utilisateur';
public const USER_ID = 'id_utilisateur';
/**
* @var int
*
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer", name="id_utilisateur")
*/
public $id_utilisateur;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="login_utilisateur" )
*/
public $login_utilisateur;
/**
* @var string @ORM\Column(type="string",length=255, nullable=true, name="password_encrypted_utilisateur" )
*/
public $password;
/**
* @ORM\Column(type="boolean")
*/
private $isVerified = false;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="mode_utilisateur" )
*/
public $mode_utilisateur;
/**
* @var string @ORM\Column(type="integer", nullable=true, name="type_abonnement" )
*/
public $type_abonnement;
/**
* @var string @ORM\Column(type="string",length=20, nullable=true, name="date_demande_inscription" )
*/
public $date_demande_inscription;
/**
* @var string @ORM\Column(type="string", nullable=true, name="date_demande_inscription_complete" )
*/
public $date_demande_inscription_complete;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="date_relance" )
*/
public $date_relance;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="date_inscription_reelle" )
*/
public $date_inscription_reelle;
/**
* @var string @ORM\Column(type="string",length=10, nullable=true, name="langue_utilisee" )
*/
public $langue_utilisee;
/**
* @var string @ORM\Column(type="string",length=30, nullable=true, name="type_utilisateur" )
*/
public $type_utilisateur;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="nom_utilisateur" )
*/
public $nom_utilisateur;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="prenom_utilisateur" )
*/
public $prenom_utilisateur;
/**
* @var string @ORM\Column(type="string",length=100, nullable=true, name="email_utilisateur" )
*/
public $email_utilisateur;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="societe_utilisateur" )
*/
public $societe_utilisateur;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="rcs_utilisateur" )
*/
public $rcs_utilisateur;
/**
* @var string @ORM\Column(type="string",length=10, nullable=true, name="relance_mail_utilisateur" )
*/
public $relance_mail_utilisateur;
/**
* @var string @ORM\Column(type="string",length=10, nullable=true, name="pieces_necessaires" )
*/
public $pieces_necessaires;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="pays_utilisateur" )
*/
public $pays_utilisateur;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="region_utilisateur" )
*/
public $region_utilisateur;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="ville_utilisateur" )
*/
public $ville_utilisateur;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="code_postal_utilisateur" )
*/
public $code_postal_utilisateur;
/**
* @var string @ORM\Column(type="string",length=100, nullable=true, name="adresse_utilisateur" )
*/
public $adresse_utilisateur;
/**
* @var string @ORM\Column(type="string", nullable=true, name="commentaire_utilisateur" )
*/
public $commentaire_utilisateur;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="litige_utilisateur" )
*/
public $litige_utilisateur;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="compte_facturation" )
*/
public $compte_facturation;
/**
* @var string @ORM\Column(type="string",length=100, nullable=true, name="factur_nom_societe" )
*/
public $factur_nom_societe;
/**
* @var string @ORM\Column(type="string",length=100, nullable=true, name="factur_adresse" )
*/
public $factur_adresse;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="factur_code_postal" )
*/
public $factur_code_postal;
/**
* @var string @ORM\Column(type="string",length=200, nullable=true, name="factur_ville" )
*/
public $factur_ville;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="factur_pays" )
*/
public $factur_pays;
/**
* @var string @ORM\Column(type="string",length=5, nullable=true, name="factur_id_pays" )
*/
public $factur_id_pays;
/**
* @var string @ORM\Column(type="string",length=10, nullable=true, name="id_type_structure" )
*/
public $id_type_structure;
/**
* @var string @ORM\Column(type="string",length=150, nullable=true, name="telephone_utilisateur" )
*/
public $telephone_utilisateur;
/**
* @var string @ORM\Column(type="string",length=20, nullable=true, name="indicatif_tel" )
*/
public $indicatif_tel;
/**
* @var string @ORM\Column(type="integer", nullable=true, name="id_structure" )
*/
public $id_structure;
/**
* @var string @ORM\Column(type="integer", nullable=true, name="id_gestionnaire_fonds" )
*/
public $id_gestionnaire_fonds;
/**
* @var string @ORM\Column(type="string",length=255, nullable=true, name="fonction_utilisateur" )
*/
public $fonction_utilisateur;
/**
* @var string @ORM\Column(type="string",length=255, nullable=true, name="lien_internet" )
*/
public $lien_internet;
/**
* @var string @ORM\Column(type="string",length=255, nullable=true, name="tva_intracommunautaire" )
*/
public $tva_intracommunautaire;
/**
* @var string @ORM\Column(type="integer", nullable=true, name="id_client_publicite" )
*/
public $id_client_publicite;
/**
* @var string @ORM\Column(type="string",length=30, nullable=true, name="inscription_partenaire" )
*/
public $inscription_partenaire;
/**
* @var string @ORM\Column(type="string",length=20, nullable=true, name="site_partenaire" )
*/
public $site_partenaire;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="provenance_connexion_fusacq" )
*/
public $provenance_connexion_fusacq;
/**
* @var string @ORM\Column(type="string", nullable=true, name="suivi" )
*/
public $suivi;
/**
* @var string @ORM\Column(type="string",length=10, nullable=true, name="date_derniere_connexion" )
*/
public $date_derniere_connexion;
/**
* @var string @ORM\Column(type="string",length=10, nullable=true, name="date_desinscription_fusacq" )
*/
public $date_desinscription_fusacq;
/**
* @var string @ORM\Column(type="string",length=45, nullable=true, name="type_commande" )
*/
public $type_commande;
/**
* @var string @ORM\Column(type="string",length=10, nullable=true, name="date_derniere_commande" )
*/
public $date_derniere_commande;
/**
* @var string @ORM\Column(type="string",length=10, nullable=true, name="date_dernier_depot_annonce" )
*/
public $date_dernier_depot_annonce;
/**
* @var string @ORM\Column(type="string",length=45, nullable=true, name="etat_relance" )
*/
public $etat_relance;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="agence_utilisateur" )
*/
public $agence_utilisateur;
/**
* @var string @ORM\Column(type="string",length=200, nullable=true, name="cookie_authentification" )
*/
public $cookie_authentification;
/**
* @var string @ORM\Column(type="string",length=6, nullable=true, name="id_pays_utilisateur" )
*/
public $id_pays_utilisateur;
/**
* @var string @ORM\Column(type="string",length=10, nullable=true, name="id_region" )
*/
public $id_region;
/**
* @var string @ORM\Column(type="string",length=50, nullable=true, name="contact_suite_inscription" )
*/
public $contact_suite_inscription;
/**
* @var string @ORM\Column(type="integer", nullable=true, name="id_societe_prestataire" )
*/
public $id_societe_prestataire;
/**
* @var string @ORM\Column(type="integer", nullable=true, name="association_societe_prestataire" )
*/
public $association_societe_prestataire;
/**
* @var string @ORM\Column(type="string",length=145, nullable=true, name="mail_note_qualite_mer" )
*/
public $mail_note_qualite_mer;
/**
* @var string @ORM\Column(type="string",length=45, nullable=true, name="provenance_notoriete_fusacq" )
*/
public $provenance_notoriete_fusacq;
/**
* @var string @ORM\Column(type="integer", nullable=true, name="id_reseau_commerce" )
*/
public $id_reseau_commerce;
/**
* @var string @ORM\Column(type="decimal", nullable=true, name="montant_contact_defaut" )
*/
public $montant_contact_defaut;
/**
* @var string @ORM\Column(type="decimal", nullable=true, name="montant_contact_international_defaut" )
*/
public $montant_contact_international_defaut;
/**
* @var string @ORM\Column(type="string",length=45, nullable=true, name="type_utilisateur_commerce" )
*/
public $type_utilisateur_commerce;
/**
* @var string @ORM\Column(type="integer", nullable=true, name="annee_naissance" )
*/
public $annee_naissance;
/**
* @var string @ORM\Column(type="string",length=45, nullable=true, name="civilite" )
*/
public $civilite;
/**
* @var string @ORM\Column(type="string",length=3, nullable=true, name="inscription_validee" )
*/
public $inscription_validee;
/**
* @var string @ORM\Column(type="string",length=45, nullable=true, name="plateforme_inscription" )
*/
public $plateforme_inscription;
/**
* @var string @ORM\Column(type="string",length=45, nullable=true, name="frequence_envoi_alertes_commerces" )
*/
public $frequence_envoi_alertes_commerces;
/**
* @var string @ORM\Column(type="string", nullable=true, name="date_dernier_envoi_alerte_commerces" )
*/
public $date_dernier_envoi_alerte_commerces;
/**
* @var string @ORM\Column(type="string",length=45, nullable=true, name="mode_reglement_commerce" )
*/
public $mode_reglement_commerce;
/**
* @var string @ORM\Column(type="integer", nullable=true, name="id_agence_commerce" )
*/
public $id_agence_commerce;
/**
* @var string @ORM\Column(type="string",length=45, nullable=true, name="provenance_connexion_commerces" )
*/
public $provenance_connexion_commerces;
/**
* @var string @ORM\Column(type="string", nullable=true, name="importer_annonces_pdc_sur_ce_compte" )
*/
public $importer_annonces_pdc_sur_ce_compte;
/**
* @var string @ORM\Column(type="string",length=3, nullable=true, name="email_invalide" )
*/
public $email_invalide;
/**
* @var string @ORM\Column(type="string",length=45, nullable=true, name="personne_societe" )
*/
public $personne_societe;
/**
* @var string @ORM\Column(type="string",length=45, nullable=true, name="type_utilisateur_franchise" )
*/
public $type_utilisateur_franchise;
/**
* @var string @ORM\Column(type="string",length=45, nullable=true, name="mode_reglement_franchise" )
*/
public $mode_reglement_franchise;
/**
* @var string @ORM\Column(type="decimal", nullable=true, name="montant_cv_defaut" )
*/
public $montant_cv_defaut;
/**
* @var string @ORM\Column(type="decimal", nullable=true, name="montant_cv_international_defaut" )
*/
public $montant_cv_international_defaut;
/**
* @var string @ORM\Column(type="integer", nullable=true, name="id_cv" )
*/
public $id_cv;
/**
* @var string @ORM\Column(type="string",length=200, nullable=true, name="telephone_utilisateur_back" )
*/
public $telephone_utilisateur_back;
/**
* @var string @ORM\Column(type="string",length=100, nullable=true, name="site_derniere_connexion" )
*/
public $site_derniere_connexion;
/**
* @var string @ORM\Column(type="string",length=45, nullable=true, name="date_derniere_notification_propose_cv_pdc"
* )
*/
public $date_derniere_notification_propose_cv_pdc;
/**
* @var string @ORM\Column(type="string",length=3, nullable=true, name="devise" )
*/
public $devise;
/**
* @var string @ORM\Column(type="string",length=10, nullable=true, name="id_pays_tarif_applicable" )
*/
public $id_pays_tarif_applicable;
/**
* @var string @ORM\Column(type="string", nullable=false, name="identifiant_entreprise" )
*/
public $identifiant_entreprise;
/**
* @var string @ORM\Column(type="boolean", nullable=false, name="non_assujetti_tva" )
*/
public $non_assujetti_tva;
public function setEmail(string $email): self {
$this->email_utilisateur = $email;
return $this;
}
/**
* A visual identifier that represents this user.
*
* @see UserInterface
*/
public function getUserIdentifier(): string {
return (string) $this->email_utilisateur;
}
#[ORM\Column(type: 'json')]
private $roles = [];
/**
* @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;
}
/**
* Returns the password used to authenticate the user.
* This should be the encoded password. On authentication, a plain-text
* password will be salted, encoded, and then compared to this value.
* @return string|null The encoded password if any
*/
public function getPassword(): ?string {
return $this->password;
}
public function setPassword(string $password): self {
$this->password = $password;
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 isVerified(): bool {
return $this->isVerified;
}
public function setIsVerified(bool $isVerified): self {
$this->isVerified = $isVerified;
return $this;
}
public function getId() {
return $this->id_utilisateur;
}
public function getIdUtilisateur() {
return $this->id_utilisateur;
}
/**
* Returns the username used to authenticate the user.
* @return string The username
*/
public function getEmail() {
return $this->email_utilisateur;
}
/**
* @return int[]|string[]
*/
public function getAttribute() {
return array_keys(get_class_vars(get_class($this)));
}
/**
* Magic setter to save public properties.
* @param string $property
* @param mixed $value
*/
public function _get($property) {
return $this->$property;
}
/**
* Magic getter to expose public properties.
* @param string $property
* @return mixed
*/
public function _set($property, $value) {
$this->$property = $value;
}
public function setPasswordEncryptedUtilisateur(string $password_encrypted_utilisateur) {
$this->password = $password_encrypted_utilisateur;
}
/**
* Returns the username used to authenticate the user.
* @return string The username
*/
public function getUsername() {
return $this->_get("login_utilisateur");
}
public function getLogin() {
return $this->_get("login_utilisateur");
}
}