Created
November 16, 2016 00:37
-
-
Save ikwattro/20056e0991a8bf3a540d1524335ac452 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use GraphAware\Neo4j\OGM\Annotations as OGM; | |
use Doctrine\Common\Collections\ArrayCollection; | |
/** | |
* @OGM\Node(label="Character") | |
*/ | |
class Character | |
{ | |
/** | |
* @var int | |
* | |
* @OGM\GraphId() | |
*/ | |
protected $id; | |
/** | |
* @var string | |
* | |
* @OGM\Property(type="string") | |
*/ | |
protected $name; | |
/** | |
* @var Character[] | |
* | |
* @OGM\Relationship(type="ALLY_OF", direction="OUTGOING", targetEntity="Character", mappedBy="ally", collection=true) | |
*/ | |
protected $allies; | |
public function __construct() | |
{ | |
$this->allies = new ArrayCollection(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment