您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

36 行
877B

  1. <?php
  2. namespace App\Entity\User;
  3. use App\Entity\CollectifData;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Lc\SovBundle\Model\User\UserModel as SovUserModel;
  8. use Lc\SovBundle\Model\User\UserInterface;
  9. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  10. /**
  11. * @ORM\Entity(repositoryClass="Lc\SovBundle\Repository\User\UserRepository")
  12. * @UniqueEntity(fields={"email"}, message="There is already an account with this email")
  13. */
  14. class User extends SovUserModel implements UserInterface
  15. {
  16. /**
  17. * @ORM\Id
  18. * @ORM\GeneratedValue
  19. * @ORM\Column(type="integer")
  20. */
  21. private $id;
  22. public function __toString()
  23. {
  24. return $this->firstname . " " . $this->lastname;
  25. }
  26. public function getId(): ?int
  27. {
  28. return $this->id;
  29. }
  30. }