瀏覽代碼

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

feature/export_comptable
Guillaume 4 年之前
父節點
當前提交
324299673f
共有 2 個檔案被更改,包括 45 行新增6 行删除
  1. +16
    -0
      ShopBundle/Controller/Backend/UserMerchantController.php
  2. +29
    -6
      ShopBundle/Model/UserMerchant.php

+ 16
- 0
ShopBundle/Controller/Backend/UserMerchantController.php 查看文件

@@ -0,0 +1,16 @@
<?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 查看文件

@@ -7,12 +7,13 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Lc\ShopBundle\Context\CreditHistoryInterface;
use Lc\ShopBundle\Context\FilterMerchantInterface;

/**
* @ORM\MappedSuperclass()
*
*/
abstract class UserMerchant
abstract class UserMerchant implements FilterMerchantInterface
{
/**
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface", inversedBy="userMerchants")
@@ -27,9 +28,14 @@ abstract class UserMerchant
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)
@@ -53,12 +59,12 @@ abstract class UserMerchant
return $this;
}

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

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

@@ -70,13 +76,30 @@ abstract class UserMerchant
return $this->credit;
}

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

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[]
*/

Loading…
取消
儲存