|
|
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
|
|
namespace Lc\ShopBundle\Model; |
|
|
|
|
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
|
|
|
|
use Gedmo\Mapping\Annotation as Gedmo; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @ORM\MappedSuperclass |
|
|
|
|
|
*/ |
|
|
|
|
|
abstract class AbstractEntity |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @ORM\Column(type="datetime") |
|
|
|
|
|
* @Gedmo\Timestampable(on="create") |
|
|
|
|
|
*/ |
|
|
|
|
|
protected $createdAt; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @ORM\Column(type="datetime") |
|
|
|
|
|
* @Gedmo\Timestampable(on="update") |
|
|
|
|
|
*/ |
|
|
|
|
|
protected $updatedAt; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @ORM\ManyToOne(targetEntity="UserInterface") |
|
|
|
|
|
* @ORM\JoinColumn(nullable=false) |
|
|
|
|
|
*/ |
|
|
|
|
|
protected $createdBy; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @ORM\ManyToOne(targetEntity="UserInterface") |
|
|
|
|
|
* @ORM\JoinColumn(nullable=false) |
|
|
|
|
|
*/ |
|
|
|
|
|
protected $updatedBy; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function getCreatedAt(): ?\DateTimeInterface |
|
|
|
|
|
{ |
|
|
|
|
|
return $this->createdAt; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function setCreatedAt(\DateTimeInterface $createdAt): self |
|
|
|
|
|
{ |
|
|
|
|
|
$this->createdAt = $createdAt; |
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function getUpdatedAt(): ?\DateTimeInterface |
|
|
|
|
|
{ |
|
|
|
|
|
return $this->updatedAt; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function setUpdatedAt(\DateTimeInterface $updatedAt): self |
|
|
|
|
|
{ |
|
|
|
|
|
$this->updatedAt = $updatedAt; |
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
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; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |