123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace SoftDeleteable\Fixture\Document;
- use Gedmo\Mapping\Annotation as Gedmo;
- use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
- /**
- * @ODM\Document(collection="users")
- * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=true)
- */
- class UserTimeAware
- {
- /** @ODM\Id */
- private $id;
- /** @ODM\String */
- private $username;
- /** @ODM\Date */
- protected $deletedAt;
- /**
- * Sets deletedAt.
- *
- * @param Datetime $deletedAt
- * @return $this
- */
- public function setDeletedAt(\DateTime $deletedAt)
- {
- $this->deletedAt = $deletedAt;
- return $this;
- }
- /**
- * Returns deletedAt.
- *
- * @return DateTime
- */
- public function getDeletedAt()
- {
- return $this->deletedAt;
- }
- public function getId()
- {
- return $this->id;
- }
- public function setUsername($username)
- {
- $this->username = $username;
- }
- public function getUsername()
- {
- return $this->username;
- }
- }
|