src/Entity/User.php line 13

  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  6. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  7. use Symfony\Component\Security\Core\User\UserInterface;
  8. #[ORM\Entity()]
  9. #[UniqueEntity(fields: ['email'], message'There is already an account with this email')]
  10. class User implements UserInterfacePasswordAuthenticatedUserInterface
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column(type'integer')]
  15.     private $id;
  16.     #[ORM\Column(type'string'length180uniquetrue)]
  17.     private $email;
  18.     #[ORM\Column(type'json')]
  19.     private $roles = [];
  20.     #[ORM\Column(type'string')]
  21.     private $password;
  22.     
  23.     #[ORM\Column(type'string'length255nullabletrue)]
  24.     private $nom;
  25.     #[ORM\Column(type'string'length255nullabletrue)]
  26.     private $prenoms;
  27.     #[ORM\Column(type'string'length255nullabletrue)]
  28.     private $nomjeunefille;
  29.     #[ORM\Column(type'string'length10nullabletrue)]
  30.     private $sexe;
  31.     #[ORM\Column(type'date'nullabletrue)]
  32.     private $datenaissance;
  33.     #[ORM\Column(type'string'length255nullabletrue)]
  34.     private $lieunaissance;
  35.     #[ORM\Column(type'string'length100nullabletrue)]
  36.     private $residence;
  37.     #[ORM\Column(type'string'length15nullabletrue)]
  38.     private $situationmat;
  39.     #[ORM\Column(type'string'length22nullabletrue)]
  40.     private $contact;
  41.     #[ORM\Column(type'string'length255nullabletrue)]
  42.     private $numextrait;
  43.     #[ORM\Column(type'string'length100nullabletrue)]
  44.     private $nationalite;
  45.     #[ORM\Column(type'string'length100nullabletrue)]
  46.     private $nompere;
  47.     #[ORM\Column(type'string'length100nullabletrue)]
  48.     private $nommere;
  49.     
  50.     
  51.     public function getId(): ?int
  52.     {
  53.         return $this->id;
  54.     }
  55.     public function getEmail(): ?string
  56.     {
  57.         return $this->email;
  58.     }
  59.     public function setEmail(string $email): self
  60.     {
  61.         $this->email $email;
  62.         return $this;
  63.     }
  64.     /**
  65.      * A visual identifier that represents this user.
  66.      *
  67.      * @see UserInterface
  68.      */
  69.     public function getUserIdentifier(): string
  70.     {
  71.         return (string) $this->email;
  72.     }
  73.     /**
  74.      * @see UserInterface
  75.      */
  76.     public function getRoles(): array
  77.     {
  78.         $roles $this->roles;
  79.         return array_unique($roles);
  80.     }
  81.     public function setRoles(array $roles): self
  82.     {
  83.         $this->roles $roles;
  84.         return $this;
  85.     }
  86.     /**
  87.      * @see PasswordAuthenticatedUserInterface
  88.      */
  89.     public function getPassword(): string
  90.     {
  91.         return $this->password;
  92.     }
  93.     public function setPassword(string $password): self
  94.     {
  95.         $this->password $password;
  96.         return $this;
  97.     }
  98.     /**
  99.      * @see UserInterface
  100.      */
  101.     public function eraseCredentials()
  102.     {
  103.         // If you store any temporary, sensitive data on the user, clear it here
  104.         // $this->plainPassword = null;
  105.     }
  106.     
  107.     
  108.     
  109.     public function getNom(): ?string
  110.     {
  111.         return $this->nom;
  112.     }
  113.     public function setNom(?string $nom): self
  114.     {
  115.         $this->nom $nom;
  116.         return $this;
  117.     }
  118.     public function getPrenoms(): ?string
  119.     {
  120.         return $this->prenoms;
  121.     }
  122.     public function setPrenoms(?string $prenoms): self
  123.     {
  124.         $this->prenoms $prenoms;
  125.         return $this;
  126.     }
  127.     public function getNomjeunefille(): ?string
  128.     {
  129.         return $this->nomjeunefille;
  130.     }
  131.     public function setNomjeunefille(?string $nomjeunefille): self
  132.     {
  133.         $this->nomjeunefille $nomjeunefille;
  134.         return $this;
  135.     }
  136.     public function getSexe(): ?string
  137.     {
  138.         return $this->sexe;
  139.     }
  140.     public function setSexe(?string $sexe): self
  141.     {
  142.         $this->sexe $sexe;
  143.         return $this;
  144.     }
  145.     public function getDatenaissance(): ?\DateTimeInterface
  146.     {
  147.         return $this->datenaissance;
  148.     }
  149.     public function setDatenaissance(?\DateTimeInterface $datenaissance): self
  150.     {
  151.         $this->datenaissance $datenaissance;
  152.         return $this;
  153.     }
  154.     public function getLieunaissance(): ?string
  155.     {
  156.         return $this->lieunaissance;
  157.     }
  158.     public function setLieunaissance(?string $lieunaissance): self
  159.     {
  160.         $this->lieunaissance $lieunaissance;
  161.         return $this;
  162.     }
  163.     public function getResidence(): ?string
  164.     {
  165.         return $this->residence;
  166.     }
  167.     public function setResidence(?string $residence): self
  168.     {
  169.         $this->residence $residence;
  170.         return $this;
  171.     }
  172.     public function getSituationmat(): ?string
  173.     {
  174.         return $this->situationmat;
  175.     }
  176.     public function setSituationmat(?string $situationmat): self
  177.     {
  178.         $this->situationmat $situationmat;
  179.         return $this;
  180.     }
  181.     public function getContact(): ?string
  182.     {
  183.         return $this->contact;
  184.     }
  185.     public function setContact(?string $contact): self
  186.     {
  187.         $this->contact $contact;
  188.         return $this;
  189.     }
  190.     public function getNumextrait(): ?string
  191.     {
  192.         return $this->numextrait;
  193.     }
  194.     public function setNumextrait(?string $numextrait): self
  195.     {
  196.         $this->numextrait $numextrait;
  197.         return $this;
  198.     }
  199.     public function getNationalite(): ?string
  200.     {
  201.         return $this->nationalite;
  202.     }
  203.     public function setNationalite(?string $nationalite): self
  204.     {
  205.         $this->nationalite $nationalite;
  206.         return $this;
  207.     }
  208.     public function getNompere(): ?string
  209.     {
  210.         return $this->nompere;
  211.     }
  212.     public function setNompere(?string $nompere): self
  213.     {
  214.         $this->nompere $nompere;
  215.         return $this;
  216.     }
  217.     public function getNommere(): ?string
  218.     {
  219.         return $this->nommere;
  220.     }
  221.     public function setNommere(?string $nommere): self
  222.     {
  223.         $this->nommere $nommere;
  224.         return $this;
  225.     }
  226. }