Pārlūkot izejas kodu

adding image to PointSale

packProduct
Charly pirms 3 gadiem
vecāks
revīzija
e1dff1b7ed
1 mainītis faili ar 17 papildinājumiem un 0 dzēšanām
  1. +17
    -0
      Model/PointSale/PointSaleModel.php

+ 17
- 0
Model/PointSale/PointSaleModel.php Parādīt failu

@@ -12,6 +12,7 @@ use Lc\CaracoleBundle\Model\Address\AddressInterface;
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
use Lc\CaracoleBundle\Model\User\UserPointSaleInterface;
use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;
use App\Entity\File\File;

/**
* @ORM\MappedSuperclass()
@@ -43,6 +44,10 @@ abstract class PointSaleModel extends AbstractFullEntity implements FilterMultip
*/
protected $userPointSales;

/**
* @ORM\ManyToOne(targetEntity=File::class, cascade={"persist", "remove"})
*/
protected $image;

public function __construct()
{
@@ -140,4 +145,16 @@ abstract class PointSaleModel extends AbstractFullEntity implements FilterMultip

return $this;
}

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

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

return $this;
}
}

Notiek ielāde…
Atcelt
Saglabāt