src/Entity/Chapter.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\ChapterRepository")
  6.  */
  7. class Chapter
  8. {
  9.     /**
  10.      * @ORM\Id()
  11.      * @ORM\GeneratedValue()
  12.      * @ORM\Column(type="integer")
  13.      */
  14.     private $id;
  15.     /**
  16.      * @ORM\Column(type="string", length=255)
  17.      */
  18.     private $title;
  19.     /**
  20.      * @ORM\Column(type="string", length=255)
  21.      */
  22.     private $inBook;
  23.     /**
  24.      * @ORM\Column(type="string", length=255, nullable=true)
  25.      */
  26.     private $url;
  27.     /**
  28.      * @ORM\Column(type="string", length=255)
  29.      */
  30.     private $authors;
  31.     /**
  32.      * @ORM\Column(type="integer")
  33.      */
  34.     private $year;
  35.     /**
  36.      * @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="chapters")
  37.      * @ORM\JoinColumn(nullable=false)
  38.      */
  39.     private $user;
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getTitle(): ?string
  45.     {
  46.         return $this->title;
  47.     }
  48.     public function setTitle(string $title): self
  49.     {
  50.         $this->title $title;
  51.         return $this;
  52.     }
  53.     public function getInBook(): ?string
  54.     {
  55.         return $this->inBook;
  56.     }
  57.     public function setInBook(string $inBook): self
  58.     {
  59.         $this->inBook $inBook;
  60.         return $this;
  61.     }
  62.     public function getUrl(): ?string
  63.     {
  64.         return $this->url;
  65.     }
  66.     public function setUrl(?string $url): self
  67.     {
  68.         $this->url $url;
  69.         return $this;
  70.     }
  71.     public function getAuthors(): ?string
  72.     {
  73.         return $this->authors;
  74.     }
  75.     public function setAuthors(string $authors): self
  76.     {
  77.         $this->authors $authors;
  78.         return $this;
  79.     }
  80.     public function getYear(): ?int
  81.     {
  82.         return $this->year;
  83.     }
  84.     public function setYear(int $year): self
  85.     {
  86.         $this->year $year;
  87.         return $this;
  88.     }
  89.     public function getUser(): ?User
  90.     {
  91.         return $this->user;
  92.     }
  93.     public function setUser(?User $user): self
  94.     {
  95.         $this->user $user;
  96.         return $this;
  97.     }
  98. }