src/Entity/Users.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3.  
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. use Symfony\Component\Security\Core\User\UserInterface;
  7. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  8. /**
  9.  * @ORM\Entity(repositoryClass="App\Repository\UsersRepository")
  10.  * @UniqueEntity(
  11.  * fields= {"Email"},
  12.  * message= "l'email est deja utilisé"
  13.  * ) 
  14.  */
  15. class Users implements UserInterface 
  16. {
  17.     /**
  18.      * @ORM\Id()
  19.      * @ORM\GeneratedValue()
  20.      * @ORM\Column(type="integer")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @ORM\Column(type="string", length=255)
  25.      */
  26.     private $Email;
  27.     /**
  28.      * @ORM\Column(type="string", length=255)
  29.      */
  30.     private $Password;
  31.     /**
  32.      * @ORM\Column(type="array")
  33.      */
  34.     private $Roles = [];
  35.     /**
  36.      * @ORM\Column(type="string", length=255)
  37.      */
  38.     private $Username;
  39.     /**
  40.      * @ORM\Column(type="string", length=255)
  41.      */
  42.     private $Type;
  43.     /**
  44.      * @ORM\Column(type="string", length=255, nullable=true)
  45.      */
  46.     private $Nom;
  47.     /**
  48.      * @ORM\Column(type="string", length=255, nullable=true)
  49.      */
  50.     private $Prenom;
  51.     /**
  52.      * @ORM\Column(type="string", length=255, nullable=true)
  53.      */
  54.     private $Adresse;
  55.     /**
  56.      * @ORM\Column(type="string", length=255, nullable=true)
  57.      */
  58.     private $Ville;
  59.     /**
  60.      * @ORM\Column(type="string", length=255, nullable=true)
  61.      */
  62.     private $CP;
  63.     /**
  64.      * @ORM\Column(type="string", length=255, nullable=true)
  65.      */
  66.     private $Pays;
  67.     /**
  68.      * @ORM\Column(type="string", length=255, nullable=true)
  69.      */
  70.     private $Raisonsocial;
  71.     /**
  72.      * @ORM\Column(type="string", length=255, nullable=true)
  73.      */
  74.     private $Tva;
  75.     /**
  76.      * @ORM\Column(type="string", length=255, nullable=true)
  77.      */
  78.     private $Denomination;
  79.     /**
  80.      * @ORM\Column(type="string", length=255, nullable=true)
  81.      */
  82.     private $Rna;
  83.     /**
  84.      * @ORM\Column(type="string", length=255, nullable=true)
  85.      */
  86.     private $Telephone;
  87.     /**
  88.      * @ORM\Column(type="string", length=255, nullable=true)
  89.      */
  90.     private $TvaClient;
  91.     /**
  92.      * @ORM\Column(type="string", length=255, nullable=true)
  93.      */
  94.     private $NoTva;
  95.     /**
  96.      * @ORM\Column(type="string", length=255, nullable=true)
  97.      */
  98.     private $Typrospect;
  99.     /**
  100.      * @ORM\Column(type="string", length=255, nullable=true)
  101.      */
  102.     private $NomClient;
  103.     /**
  104.      * @ORM\Column(type="string", length=255, nullable=true)
  105.      */
  106.     private $CodeClient;
  107.     public function getId(): ?int
  108.     {
  109.         return $this->id;
  110.     }
  111.     public function getEmail(): ?string
  112.     {
  113.         return $this->Email;
  114.     }
  115.     public function setEmail(string $Email): self
  116.     {
  117.         $this->Email $Email;
  118.         return $this;
  119.     }
  120.     public function getPassword(): ?string
  121.     {
  122.         return $this->Password;
  123.     }
  124.     public function setPassword(string $Password): self
  125.     {
  126.         $this->Password $Password;
  127.         return $this;
  128.     }
  129.     public function getRoles(): ?array
  130.     {
  131.         $Roles $this->Roles;
  132.     // guarantee every user at least has ROLE_USER
  133.     $Roles[] = 'ROLE_USER';
  134.     return array_unique($Roles);
  135.     }
  136.     public function setRoles(array $Roles): self
  137.     {
  138.         $this->Roles $Roles;
  139.         return $this;
  140.     }
  141.     
  142.     public function eraseCredentials(){}
  143.     
  144.     public function getSalt(){}
  145.     public function getUsername(): ?string
  146.     {
  147.         return $this->Username;
  148.     }
  149.     public function setUsername(string $Username): self
  150.     {
  151.         $this->Username $Username;
  152.         return $this;
  153.     }
  154.     public function getType(): ?string
  155.     {
  156.         return $this->Type;
  157.     }
  158.     public function setType(string $Type): self
  159.     {
  160.         $this->Type $Type;
  161.         return $this;
  162.     }
  163.     public function getNom(): ?string
  164.     {
  165.         return $this->Nom;
  166.     }
  167.     public function setNom(?string $Nom): self
  168.     {
  169.         $this->Nom $Nom;
  170.         return $this;
  171.     }
  172.     public function getPrenom(): ?string
  173.     {
  174.         return $this->Prenom;
  175.     }
  176.     public function setPrenom(?string $Prenom): self
  177.     {
  178.         $this->Prenom $Prenom;
  179.         return $this;
  180.     }
  181.     public function getAdresse(): ?string
  182.     {
  183.         return $this->Adresse;
  184.     }
  185.     public function setAdresse(?string $Adresse): self
  186.     {
  187.         $this->Adresse $Adresse;
  188.         return $this;
  189.     }
  190.     public function getVille(): ?string
  191.     {
  192.         return $this->Ville;
  193.     }
  194.     public function setVille(?string $Ville): self
  195.     {
  196.         $this->Ville $Ville;
  197.         return $this;
  198.     }
  199.     public function getCP(): ?string
  200.     {
  201.         return $this->CP;
  202.     }
  203.     public function setCP(?string $CP): self
  204.     {
  205.         $this->CP $CP;
  206.         return $this;
  207.     }
  208.     public function getPays(): ?string
  209.     {
  210.         return $this->Pays;
  211.     }
  212.     public function setPays(?string $Pays): self
  213.     {
  214.         $this->Pays $Pays;
  215.         return $this;
  216.     }
  217.     public function getRaisonsocial(): ?string
  218.     {
  219.         return $this->Raisonsocial;
  220.     }
  221.     public function setRaisonsocial(?string $Raisonsocial): self
  222.     {
  223.         $this->Raisonsocial $Raisonsocial;
  224.         return $this;
  225.     }
  226.     public function getTva(): ?string
  227.     {
  228.         return $this->Tva;
  229.     }
  230.     public function setTva(?string $Tva): self
  231.     {
  232.         $this->Tva $Tva;
  233.         return $this;
  234.     }
  235.     public function getDenomination(): ?string
  236.     {
  237.         return $this->Denomination;
  238.     }
  239.     public function setDenomination(?string $Denomination): self
  240.     {
  241.         $this->Denomination $Denomination;
  242.         return $this;
  243.     }
  244.     public function getRna(): ?string
  245.     {
  246.         return $this->Rna;
  247.     }
  248.     public function setRna(?string $Rna): self
  249.     {
  250.         $this->Rna $Rna;
  251.         return $this;
  252.     }
  253.     public function getTelephone(): ?string
  254.     {
  255.         return $this->Telephone;
  256.     }
  257.     public function setTelephone(?string $Telephone): self
  258.     {
  259.         $this->Telephone $Telephone;
  260.         return $this;
  261.     }
  262.     public function getTvaClient(): ?string
  263.     {
  264.         return $this->TvaClient;
  265.     }
  266.     public function setTvaClient(?string $TvaClient): self
  267.     {
  268.         $this->TvaClient $TvaClient;
  269.         return $this;
  270.     }
  271.     public function getNoTva(): ?string
  272.     {
  273.         return $this->NoTva;
  274.     }
  275.     public function setNoTva(?string $NoTva): self
  276.     {
  277.         $this->NoTva $NoTva;
  278.         return $this;
  279.     }
  280.     public function getTyprospect(): ?string
  281.     {
  282.         return $this->Typrospect;
  283.     }
  284.     public function setTyprospect(?string $Typrospect): self
  285.     {
  286.         $this->Typrospect $Typrospect;
  287.         return $this;
  288.     }
  289.     public function getNomClient(): ?string
  290.     {
  291.         return $this->NomClient;
  292.     }
  293.     public function setNomClient(?string $NomClient): self
  294.     {
  295.         $this->NomClient $NomClient;
  296.         return $this;
  297.     }
  298.     public function getCodeClient(): ?string
  299.     {
  300.         return $this->CodeClient;
  301.     }
  302.     public function setCodeClient(?string $CodeClient): self
  303.     {
  304.         $this->CodeClient $CodeClient;
  305.         return $this;
  306.     }
  307. }