|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
-
- namespace Lc\SovBundle\Doctrine\Extension;
-
- use Doctrine\ORM\Mapping as ORM;
- use Gedmo\Mapping\Annotation as Gedmo;
- use Lc\SovBundle\Model\User\UserInterface;
-
- trait BlameableTrait
- {
-
- /**
- * @Gedmo\Blameable(on="create")
- * @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface")
- * @ORM\JoinColumn(nullable=true)
- */
- protected $createdBy;
-
- /**
- * @Gedmo\Blameable(on="update")
- * @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface")
- * @ORM\JoinColumn(nullable=true)
- */
- protected $updatedBy;
-
-
- public function getCreatedBy(): ?UserInterface
- {
- return $this->createdBy;
- }
-
- public function setCreatedBy(?UserInterface $createdBy): self
- {
- $this->createdBy = $createdBy;
-
- return $this;
- }
-
- public function getUpdatedBy(): ?UserInterface
- {
- return $this->updatedBy;
- }
-
- public function setUpdatedBy(?UserInterface $updatedBy): self
- {
- $this->updatedBy = $updatedBy;
-
- return $this;
- }
- }
|