Guillaume 3 лет назад
Родитель
Сommit
5e8356ed6d
3 измененных файлов: 40 добавлений и 1 удалений
  1. +1
    -0
      CaracoleBundle
  2. +21
    -1
      Model/Product/ProductCategoryModel.php
  3. +18
    -0
      Model/User/UserModel.php

+ 1
- 0
CaracoleBundle Просмотреть файл

@@ -0,0 +1 @@
CaracoleBundle

+ 21
- 1
Model/Product/ProductCategoryModel.php Просмотреть файл

@@ -9,11 +9,13 @@ use Lc\CaracoleBundle\Doctrine\Extension\FilterSectionInterface;
use Lc\CaracoleBundle\Model\Section\SectionInterface;
use Lc\SovBundle\Doctrine\Extension\TreeInterface;
use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;
use Lc\SovBundle\Model\File\FileInterface;

/**
* @ORM\MappedSuperclass()
*/
abstract class ProductCategoryModel extends AbstractFullEntity implements TreeInterface, FilterSectionInterface, ProductCategoryInterface
abstract class ProductCategoryModel extends AbstractFullEntity implements TreeInterface, FilterSectionInterface,
ProductCategoryInterface
{
/**
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Section\SectionInterface")
@@ -42,6 +44,12 @@ abstract class ProductCategoryModel extends AbstractFullEntity implements TreeIn
*/
protected $saleStatus;

/**
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\File\FileInterface", cascade={"persist", "remove"})
*/
protected $image;


public function __construct()
{
$this->childrens = new ArrayCollection();
@@ -181,4 +189,16 @@ abstract class ProductCategoryModel extends AbstractFullEntity implements TreeIn
return $this;
}

public function getImage(): ?FileInterface
{
return $this->image;
}

public function setImage(?FileInterface $image): self
{
$this->image = $image;

return $this;
}

}

+ 18
- 0
Model/User/UserModel.php Просмотреть файл

@@ -38,6 +38,11 @@ abstract class UserModel extends SovUserModel
*/
protected $favoriteMerchant;

/**
* @ORM\Column(type="datetime", nullable=true)
*/
protected $lastLogin;

/**
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Address\AddressInterface", mappedBy="user", cascade={"persist"})
*/
@@ -122,6 +127,19 @@ abstract class UserModel extends SovUserModel
return $this;
}

public function getLastLogin()
{
return $this->lastLogin;
}

public function setLastLogin(\DateTime $time = null)
{
$this->lastLogin = $time;

return $this;
}


/**
* @return Collection|AddressInterface[]
*/

Загрузка…
Отмена
Сохранить