Przeglądaj źródła

Merge branch 'develop' of https://gitea.laclic.fr/Laclic/LcShopBundle into develop

feature/export_comptable
Guillaume 4 lat temu
rodzic
commit
324299673f
2 zmienionych plików z 45 dodań i 6 usunięć
  1. +16
    -0
      ShopBundle/Controller/Backend/UserMerchantController.php
  2. +29
    -6
      ShopBundle/Model/UserMerchant.php

+ 16
- 0
ShopBundle/Controller/Backend/UserMerchantController.php Wyświetl plik

<?php

namespace Lc\ShopBundle\Controller\Backend;

use App\Repository\UserRepository;
use Lc\ShopBundle\Context\NewsInterface;
use Lc\ShopBundle\Context\UserInterface;
use Mailjet\MailjetSwiftMailer\SwiftMailer\MailjetTransport;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

class UserMerchantController extends AdminController
{



}

+ 29
- 6
ShopBundle/Model/UserMerchant.php Wyświetl plik

use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\ShopBundle\Context\CreditHistoryInterface; use Lc\ShopBundle\Context\CreditHistoryInterface;
use Lc\ShopBundle\Context\FilterMerchantInterface;


/** /**
* @ORM\MappedSuperclass() * @ORM\MappedSuperclass()
* *
*/ */
abstract class UserMerchant
abstract class UserMerchant implements FilterMerchantInterface
{ {
/** /**
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface", inversedBy="userMerchants") * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface", inversedBy="userMerchants")
protected $merchant; protected $merchant;


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

/**
* @ORM\Column(type="boolean")
*/
protected $creditActive;


/** /**
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\CreditHistoryInterface", mappedBy="userMerchant", orphanRemoval=true) * @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\CreditHistoryInterface", mappedBy="userMerchant", orphanRemoval=true)
return $this; return $this;
} }


public function getMerchant(): ?Hub
public function getMerchant(): ?Merchant
{ {
return $this->merchant; return $this->merchant;
} }


public function setMerchant(?Hub $merchant): self
public function setMerchant(?Merchant $merchant): self
{ {
$this->merchant = $merchant; $this->merchant = $merchant;


return $this->credit; return $this->credit;
} }


public function setCredit(float $credit): self
public function setCredit(?float $credit): self
{ {
$this->credit = $credit; $this->credit = $credit;


return $this; return $this;
} }


public function getCreditActive(): ?bool
{
return $this->creditActive;
}

public function isCreditActive(): bool
{
return $this->creditActive;
}

public function setCreditActive(bool $creditActive): self
{
$this->creditActive = $creditActive;

return $this;
}

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

Ładowanie…
Anuluj
Zapisz