src/Entity/Customer/Customer.php line 22

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\Customer;
  4. use App\Entity\LicenceFile;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping\MappedSuperclass;
  8. use Doctrine\ORM\Mapping\Table;
  9. use Sylius\Component\Core\Model\Customer as BaseCustomer;
  10. use Doctrine\ORM\Mapping as ORM;
  11. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  12. use Symfony\Component\Validator\Constraints as Assert;
  13. /**
  14. * @ORM\Entity()
  15. * @Table(name="sylius_customer")
  16. * @UniqueEntity(fields={"pseudo"},message="Un utilisateur a déjà ce pseudo",ignoreNull=true,entityClass="App\Entity\Customer\Customer",repositoryMethod="findByPseudos")
  17. */
  18. class Customer extends BaseCustomer
  19. {
  20. public function __construct()
  21. {
  22. parent::__construct();
  23. }
  24. /** @ORM\Column(type="string", length=255))
  25. */
  26. protected $pseudo;
  27. public function getPseudo(): ?string
  28. {
  29. return $this->pseudo;
  30. }
  31. public function setPseudo(?string $pseudo): void
  32. {
  33. $this->pseudo = $pseudo;
  34. }
  35. }