Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Entity;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * @ORM\Entity(repositoryClass="App\Repository\TodoRepository")
- */
- class Todo
- {
- /**
- * @ORM\Id()
- * @ORM\GeneratedValue()
- * @ORM\Column(type="integer")
- */
- private $id;
- /**
- * @ORM\Column(type="string", length=255)
- */
- private $name;
- /**
- * @ORM\Column(type="string", length=500)
- */
- private $description;
- public function getId(): ?int
- {
- return $this->id;
- }
- public function getName(): ?string
- {
- return $this->name;
- }
- public function setName(string $name): self
- {
- $this->name = $name;
- return $this;
- }
- public function getDescription(): ?string
- {
- return $this->description;
- }
- public function setDescription(string $description): self
- {
- $this->description = $description;
- return $this;
- }
- public function toArray()
- {
- return ['id' => $this->id, 'name' => $this->name, 'description' => $this->description];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement