Newer
Older
use ApiPlatform\Core\Annotation\Property;
use ApiPlatform\Core\Annotation\Resource;
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")
* @Property(iri="http://schema.org/author")
private $author;
/**
* @var \DateTime Date of first broadcast/publication.
* @ORM\Column(type="date", nullable=true)
* @Assert\Date
* @Property(iri="http://schema.org/datePublished")
*/
private $datePublished;
/**
* @var string A short description of the item.
* @ORM\Column(nullable=true)
* @Assert\Type(type="string")
* @Property(iri="http://schema.org/description")
*/
private $description;
/**
* @var string Genre of the creative work or group.
* @ORM\Column(nullable=true)
* @Assert\Type(type="string")
* @Property(iri="http://schema.org/genre")
*/
private $genre;
* @ORM\Column(nullable=true)
* @Assert\Type(type="string")
* @ORM\Column(nullable=true)
* @Assert\Type(type="string")
* @Property(iri="http://schema.org/name")
*/
private $name;
* @ORM\Column(type="integer", nullable=true)
* @Assert\Type(type="integer")
* @Property(iri="http://schema.org/numberOfPages")
/**
* @var Organization The publisher of the creative work.
* @ORM\OneToOne(targetEntity="AppBundle\Entity\Organization")
* @Property(iri="http://schema.org/publisher")
*/
private $publisher;
* @return $this
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* Gets id.
* @return int
*/
public function getId()
{
return $this->id;
}
/**
return $this->author;
}
/**
* Sets datePublished.
* @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;
* @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;
}