src/Entity/SignUp.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SignUpRepository;
  4. use App\Validator\Constraints as Assert;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. use Symfony\Component\Security\Core\User\UserInterface;
  8. /**
  9.  * @ORM\Table(name="cardex_pro")
  10.  * @ORM\Entity(repositoryClass=SignUpRepository::class)
  11.  * @UniqueEntity(fields="email", message="Cet email n'est pas disponible.")
  12.  */
  13. class SignUp implements UserInterface
  14. {
  15.     /**
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue
  18.      * @ORM\Column(type="integer")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\Column(type="string", length=500, nullable=true)
  23.      */
  24.     private $customer_id;
  25.     /**
  26.      * @ORM\Column(type="integer", options={"default" : 0})
  27.      */
  28.     private $stripe_card;
  29.     /**
  30.      * @ORM\Column(type="string", length=500)
  31.      */
  32.     private $hash_pro;
  33.     /**
  34.      * @ORM\Column(type="integer", options={"default": 0})
  35.      */
  36.     private $trial_period;
  37.     /**
  38.      * @ORM\Column(type="string", length=255)
  39.      */
  40.     private $compagnie_name;
  41.     /**
  42.      * @ORM\Column(type="string", length=255, nullable=true)
  43.      */
  44.     private $telephone;
  45.     /**
  46.      * @Assert\EmailRequirements()
  47.      * @ORM\Column(type="string", length=255, unique=true)
  48.      */
  49.     private $email;
  50.     /**
  51.      * @ORM\Column(type="string", length=255, options={"default": "M."})
  52.      */
  53.     private $civilite_responsable;
  54.     /**
  55.      * @ORM\Column(type="string", length=255, nullable=true)
  56.      */
  57.     private $nom_responsable;
  58.     /**
  59.      * @ORM\Column(type="string", length=255, nullable=true)
  60.      */
  61.     private $prenom_responsable;
  62.     /**
  63.      * @ORM\Column(type="string", length=255)
  64.      */
  65.     private $code_activation;
  66.     /**
  67.      * @ORM\Column(type="json")
  68.      */
  69.     private $roles = [];
  70.     /**
  71.      * @Assert\PasswordRequirements()
  72.      * @ORM\Column(type="string", length=255)
  73.      */
  74.     private $mdpt;
  75.     /**
  76.      * @ORM\Column(type="integer", options={"default" : 0})
  77.      */
  78.     private $visite;
  79.     /**
  80.      * @ORM\Column(type="integer", options={"default" : 0})
  81.      */
  82.     private $statut;
  83.     /**
  84.      * @ORM\Column(type="string", length=255, nullable=true)
  85.      */
  86.     private $forme_juridique;
  87.     /**
  88.      * @ORM\Column(type="integer", nullable=true)
  89.      */
  90.     private $payment_choice;
  91.     public function getId(): ?int
  92.     {
  93.         return $this->id;
  94.     }
  95.     public function getCustomerId(): ?string
  96.     {
  97.         return $this->customer_id;
  98.     }
  99.     public function setCustomerId(?string $customer_id): self
  100.     {
  101.         $this->customer_id $customer_id;
  102.         return $this;
  103.     }
  104.     public function getStripeCard(): ?int
  105.     {
  106.         return $this->stripe_card;
  107.     }
  108.     public function setStripeCard(int $stripe_card): self
  109.     {
  110.         $this->stripe_card $stripe_card;
  111.         return $this;
  112.     }
  113.     public function getHashPro(): ?string
  114.     {
  115.         return $this->hash_pro;
  116.     }
  117.     public function setHashPro(string $hash_pro): self
  118.     {
  119.         $this->hash_pro $hash_pro;
  120.         return $this;
  121.     }
  122.     public function getTrialPeriod(): ?int
  123.     {
  124.         return $this->trial_period;
  125.     }
  126.     public function setTrialPeriod(int $trial_period): self
  127.     {
  128.         $this->trial_period $trial_period;
  129.         return $this;
  130.     }
  131.     public function getCompagnieName(): ?string
  132.     {
  133.         return $this->compagnie_name;
  134.     }
  135.     public function setCompagnieName(string $compagnie_name): self
  136.     {
  137.         $this->compagnie_name $compagnie_name;
  138.         return $this;
  139.     }
  140.     public function getTelephone(): ?string
  141.     {
  142.         return $this->telephone;
  143.     }
  144.     public function setTelephone(?string $telephone): self
  145.     {
  146.         $this->telephone $telephone;
  147.         return $this;
  148.     }
  149.     public function getEmail(): ?string
  150.     {
  151.         return $this->email;
  152.     }
  153.     public function setEmail(string $email): self
  154.     {
  155.         $this->email $email;
  156.         return $this;
  157.     }
  158.     public function getCiviliteResponsable(): ?string
  159.     {
  160.         return $this->civilite_responsable;
  161.     }
  162.     public function setCiviliteResponsable(string $civilite_responsable): self
  163.     {
  164.         $this->civilite_responsable $civilite_responsable;
  165.         return $this;
  166.     }
  167.     public function getNomResponsable(): ?string
  168.     {
  169.         return $this->nom_responsable;
  170.     }
  171.     public function setNomResponsable(?string $nom_responsable): self
  172.     {
  173.         $this->nom_responsable $nom_responsable;
  174.         return $this;
  175.     }
  176.     public function getPrenomResponsable(): ?string
  177.     {
  178.         return $this->prenom_responsable;
  179.     }
  180.     public function setPrenomResponsable(?string $prenom_responsable): self
  181.     {
  182.         $this->prenom_responsable $prenom_responsable;
  183.         return $this;
  184.     }
  185.     public function getCodeActivation(): ?string
  186.     {
  187.         return $this->code_activation;
  188.     }
  189.     public function setCodeActivation(string $code_activation): self
  190.     {
  191.         $this->code_activation $code_activation;
  192.         return $this;
  193.     }
  194.     public function getMdpt(): ?string
  195.     {
  196.         return $this->mdpt;
  197.     }
  198.     public function setMdpt(string $mdpt): self
  199.     {
  200.         $this->mdpt $mdpt;
  201.         return $this;
  202.     }
  203.     public function getPassword(): ?string
  204.     {
  205.         return $this->mdpt;
  206.     }
  207.     public function setPassword(string $mdpt): self
  208.     {
  209.         $this->mdpt $mdpt;
  210.         return $this;
  211.     }
  212.     /**
  213.      * The public representation of the user (e.g. a username, an email address, etc.)
  214.      *
  215.      * @see UserInterface
  216.      */
  217.     public function getUserIdentifier(): string
  218.     {
  219.         return (string) $this->email;
  220.     }
  221.     
  222.     /**
  223.     * @deprecated since Symfony 5.3
  224.     */
  225.     public function getUsername(): string
  226.     {
  227.         return (string) $this->email;
  228.     }
  229.     /**
  230.      * @see UserInterface
  231.      */
  232.     public function getRoles(): array
  233.     {
  234.         $roles $this->roles;
  235.         // guarantee every user at least has ROLE_USER
  236.         $roles[] = 'ROLE_USER';
  237.         return array_unique($roles);
  238.     }
  239.     public function setRoles(array $roles): self
  240.     {
  241.         $this->roles $roles;
  242.         return $this;
  243.     }
  244.     /**
  245.      * Returning a salt is only needed if you are not using a modern
  246.      * hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
  247.      *
  248.      * @see UserInterface
  249.      */
  250.     public function getSalt(): ?string
  251.     {
  252.         return null;
  253.     }
  254.     /**
  255.      * @see UserInterface
  256.      */
  257.     public function eraseCredentials()
  258.     {
  259.         // If you store any temporary, sensitive data on the user, clear it here
  260.         // $this->plainPassword = null;
  261.     }
  262.     public function getVisite(): ?int
  263.     {
  264.         return $this->visite;
  265.     }
  266.     public function setVisite(int $visite): self
  267.     {
  268.         $this->visite $visite;
  269.         return $this;
  270.     }
  271.     public function getStatut(): ?int
  272.     {
  273.         return $this->statut;
  274.     }
  275.     public function setStatut(int $statut): self
  276.     {
  277.         $this->statut $statut;
  278.         return $this;
  279.     }
  280.     public function getFormeJuridique(): ?string
  281.     {
  282.         return $this->forme_juridique;
  283.     }
  284.     public function setFormeJuridique(?string $forme_juridique): self
  285.     {
  286.         $this->forme_juridique $forme_juridique;
  287.         return $this;
  288.     }
  289.     public function getPaymentChoice(): ?int
  290.     {
  291.         return $this->payment_choice;
  292.     }
  293.     public function setPaymentChoice(?int $payment_choice): self
  294.     {
  295.         $this->payment_choice $payment_choice;
  296.         return $this;
  297.     }
  298. }