浏览代码

Ad User created

feature/export_comptable
Fab 4 年前
父节点
当前提交
8562c01efd
共有 1 个文件被更改,包括 37 次插入1 次删除
  1. +37
    -1
      ShopBundle/Model/User.php

+ 37
- 1
ShopBundle/Model/User.php 查看文件

@@ -8,6 +8,7 @@ use App\Entity\UserPointSale;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use FOS\UserBundle\Model\User as UserModelFOS;
use Lc\ShopBundle\Context\MerchantInterface;
use Lc\ShopBundle\Context\TicketInterface;
@@ -89,6 +90,18 @@ abstract class User extends UserModelFOS
*/
protected $tickets;

/**
* @ORM\Column(type="datetime")
* @Gedmo\Timestampable(on="create")
*/
protected $createdAt;

/**
* @ORM\Column(type="datetime")
* @Gedmo\Timestampable(on="update")
*/
protected $updatedAt;

public function __construct()
{
parent::__construct();
@@ -190,7 +203,7 @@ abstract class User extends UserModelFOS
}

/**
* @return Collection|ShopOrder[]
* @return Collection|OrderShop[]
*/
public function getOrders(): Collection
{
@@ -395,6 +408,29 @@ abstract class User extends UserModelFOS
}
}

return $this;
}
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;
}
}

正在加载...
取消
保存