123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <?php
- namespace Blameable\Fixture\Document;
- use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
- use Gedmo\Mapping\Annotation as Gedmo;
- /**
- * @ODM\Document(collection="articles")
- */
- class Article
- {
- /** @ODM\Id */
- private $id;
- /**
- * @ODM\String
- */
- private $title;
- /**
- * @ODM\ReferenceOne(targetDocument="Type")
- */
- private $type;
- /**
- * @var string $created
- *
- * @ODM\String
- * @Gedmo\Blameable(on="create")
- */
- private $created;
- /**
- * @var string $updated
- *
- * @ODM\String
- * @Gedmo\Blameable
- */
- private $updated;
- /**
- * @ODM\ReferenceOne(targetDocument="User")
- * @Gedmo\Blameable(on="create")
- */
- private $creator;
- /**
- * @var string $published
- *
- * @ODM\String
- * @Gedmo\Blameable(on="change", field="type.title", value="Published")
- */
- private $published;
- public function getId()
- {
- return $this->id;
- }
- public function setTitle($title)
- {
- $this->title = $title;
- }
- public function getTitle()
- {
- return $this->title;
- }
- public function getCreated()
- {
- return $this->created;
- }
- public function getPublished()
- {
- return $this->published;
- }
- public function getCreator()
- {
- return $this->creator;
- }
- public function getUpdated()
- {
- return $this->updated;
- }
- public function setType(Type $type)
- {
- $this->type = $type;
- }
- public function getType()
- {
- return $this->type;
- }
- public function setCreated($created)
- {
- $this->created = $created;
- }
- public function setPublished($published)
- {
- $this->published = $published;
- }
- public function setUpdated($updated)
- {
- $this->updated = $updated;
- }
- public function setCreator($creator)
- {
- $this->creator = $creator;
- }
- }
|