mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-27 17:28:39 +00:00
first draft of hypermedia implementation
This commit is contained in:
parent
73b7744383
commit
0f00688096
7 changed files with 166 additions and 31 deletions
|
@ -4,17 +4,21 @@ namespace Wallabag\CoreBundle\Entity;
|
|||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
use Hateoas\Configuration\Annotation as Hateoas;
|
||||
use JMS\Serializer\Annotation\XmlRoot;
|
||||
|
||||
/**
|
||||
* Entry
|
||||
*
|
||||
* @XmlRoot("entry")
|
||||
* @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\EntryRepository")
|
||||
* @ORM\Table(name="entry")
|
||||
* @ORM\HasLifecycleCallbacks()
|
||||
*
|
||||
* @Hateoas\Relation("self", href = "expr('/api/entries/' ~ object.getId())")
|
||||
*/
|
||||
class Entry
|
||||
{
|
||||
/** @Serializer\XmlAttribute */
|
||||
/**
|
||||
* @var integer
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue