Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Entity;
  4.  
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7.  
  8. /**
  9. * @ORM\Entity(repositoryClass="App\Repository\AreaRepository")
  10. * @UniqueEntity("code")
  11. */
  12. class Area
  13. {
  14. /**
  15. * @ORM\Id()
  16. * @ORM\Column(type="string", length=50, unique=true)
  17. */
  18. private $code;
  19.  
  20. public function getId(): ?int
  21. {
  22. return $this->code;
  23. }
  24.  
  25.  
  26. public function getCode(): ?string
  27. {
  28. return $this->code;
  29. }
  30.  
  31. public function setCode(string $code): self
  32. {
  33. $this->code = $code;
  34.  
  35. return $this;
  36. }
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement