Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Entity;
- use Doctrine\ORM\Mapping as ORM;
- use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
- /**
- * @ORM\Entity(repositoryClass="App\Repository\AreaRepository")
- * @UniqueEntity("code")
- */
- class Area
- {
- /**
- * @ORM\Id()
- * @ORM\Column(type="string", length=50, unique=true)
- */
- private $code;
- public function getId(): ?int
- {
- return $this->code;
- }
- public function getCode(): ?string
- {
- return $this->code;
- }
- public function setCode(string $code): self
- {
- $this->code = $code;
- return $this;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement