Newer
Older
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* A book.
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var ArrayCollection<Person> The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably.
* @ORM\ManyToMany(targetEntity="AppBundle\Entity\Person")
* @ORM\JoinTable(name="book_author")
* @ApiProperty(iri="http://schema.org/author")
/**
* @var \DateTime Date of first broadcast/publication.
* @ORM\Column(type="date", nullable=true)
* @Assert\Date
* @ORM\Column(nullable=true)
* @Assert\Type(type="string")
*/
private $description;
/**
* @var string Genre of the creative work or group.
* @ORM\Column(nullable=true)
* @Assert\Type(type="string")
/**
* @var ArrayCollection<Person> The illustrator of the book.
*
* @ORM\ManyToMany(targetEntity="AppBundle\Entity\Person")
* @ORM\JoinTable(name="book_illustrator")
* @ApiProperty(iri="http://schema.org/illustrator")
*/
private $illustrator;
* @ORM\Column(nullable=true)
* @Assert\Type(type="string")
* @ORM\Column(nullable=true)
* @Assert\Type(type="string")
* @ORM\Column(type="integer", nullable=true)
* @Assert\Type(type="integer")
/**
* @var Organization The publisher of the creative work.
* @ORM\JoinColumn(nullable=false)
* @ApiProperty(iri="http://schema.org/publisher")
* @return $this
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* Gets id.
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @return $this
*/
public function setDatePublished(\DateTime $datePublished = null)
{
$this->datePublished = $datePublished;
return $this;
}
/**
* Gets datePublished.
* @return \DateTime
*/
public function getDatePublished()
{
return $this->datePublished;
}
/**
* Sets description.
* @return $this
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Gets description.
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Sets genre.
* @return $this
*/
public function setGenre($genre)
{
$this->genre = $genre;
return $this;
}
/**
* Gets genre.
* @return string
*/
public function getGenre()
{
return $this->genre;
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
/**
* Adds illustrator.
*
* @param Person $illustrator
*
* @return $this
*/
public function addIllustrator(Person $illustrator)
{
$this->illustrator[] = $illustrator;
return $this;
}
/**
* Removes illustrator.
*
* @param Person $illustrator
*
* @return $this
*/
public function removeIllustrator(Person $illustrator)
{
$this->illustrator->removeElement($illustrator);
return $this;
}
/**
* Gets illustrator.
*
* @return ArrayCollection<Person>
*/
public function getIllustrator()
{
return $this->illustrator;
}
* @return $this
*/
public function setIsbn($isbn)
{
$this->isbn = $isbn;
return $this;
}
/**
* Gets isbn.
* @return string
*/
public function getIsbn()
{
return $this->isbn;
}
* @return $this
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Gets name.
* @return string
*/
public function getName()
{
return $this->name;
}
* @return $this
*/
public function setNumberOfPages($numberOfPages)
{
$this->numberOfPages = $numberOfPages;
return $this;
}
/**
* Gets numberOfPages.
* @return int
*/
public function getNumberOfPages()
{
return $this->numberOfPages;
}
* @return $this
*/
public function setPublisher(Organization $publisher = null)
{
$this->publisher = $publisher;
return $this;
}
/**
* Gets publisher.
* @return Organization
*/
public function getPublisher()
{
return $this->publisher;
}