Ver código fonte

Factory

packProduct
Guillaume 3 anos atrás
pai
commit
71b679492b
64 arquivos alterados com 769 adições e 257 exclusões
  1. +18
    -0
      Factory/Address/AddressFactory.php
  2. +8
    -0
      Factory/Address/AddressFactoryInterface.php
  3. +18
    -0
      Factory/Config/TaxRateFactory.php
  4. +8
    -0
      Factory/Config/TaxRateFactoryInterface.php
  5. +18
    -0
      Factory/Config/UnitFactory.php
  6. +8
    -0
      Factory/Config/UnitFactoryInterface.php
  7. +19
    -0
      Factory/Credit/CreditHistoryFactory.php
  8. +8
    -0
      Factory/Credit/CreditHistoryFactoryInterface.php
  9. +23
    -0
      Factory/File/DocumentFactory.php
  10. +8
    -0
      Factory/File/DocumentFactoryInterface.php
  11. +18
    -0
      Factory/Merchant/MerchantFactory.php
  12. +8
    -0
      Factory/Merchant/MerchantFactoryInterface.php
  13. +23
    -0
      Factory/Newsletter/NewsletterFactory.php
  14. +18
    -0
      Factory/Order/OrderPaymentFactory.php
  15. +8
    -0
      Factory/Order/OrderPaymentFactoryInterface.php
  16. +18
    -0
      Factory/Order/OrderProductFactory.php
  17. +8
    -0
      Factory/Order/OrderProductFactoryInterface.php
  18. +18
    -0
      Factory/Order/OrderProductReductionCatalogFactory.php
  19. +8
    -0
      Factory/Order/OrderProductReductionCatalogFactoryInterface.php
  20. +18
    -0
      Factory/Order/OrderProductRefundFactory.php
  21. +8
    -0
      Factory/Order/OrderProductRefundFactoryInterface.php
  22. +18
    -0
      Factory/Order/OrderReductionCartFactory.php
  23. +7
    -0
      Factory/Order/OrderReductionCartFactoryInterface.php
  24. +18
    -0
      Factory/Order/OrderReductionCreditFactory.php
  25. +8
    -0
      Factory/Order/OrderReductionCreditFactoryInterface.php
  26. +18
    -0
      Factory/Order/OrderRefundFactory.php
  27. +8
    -0
      Factory/Order/OrderRefundFactoryInterface.php
  28. +18
    -0
      Factory/Order/OrderShopFactory.php
  29. +8
    -0
      Factory/Order/OrderShopFactoryInterface.php
  30. +18
    -0
      Factory/Order/OrderStatusFactory.php
  31. +8
    -0
      Factory/Order/OrderStatusFactoryInterface.php
  32. +18
    -0
      Factory/Order/OrderStatusHistoryFactory.php
  33. +8
    -0
      Factory/Order/OrderStatusHistoryFactoryInterface.php
  34. +18
    -0
      Factory/PointSale/PointSaleFactory.php
  35. +8
    -0
      Factory/PointSale/PointSaleFactoryInterface.php
  36. +18
    -0
      Factory/Product/ProductCategoryFactory.php
  37. +8
    -0
      Factory/Product/ProductCategoryFactoryInterface.php
  38. +18
    -0
      Factory/Product/ProductFactory.php
  39. +8
    -0
      Factory/Product/ProductFactoryInterface.php
  40. +18
    -0
      Factory/Product/ProductFamilyFactory.php
  41. +8
    -0
      Factory/Product/ProductFamilyFactoryInterface.php
  42. +18
    -0
      Factory/Reduction/ReductionCartFactory.php
  43. +8
    -0
      Factory/Reduction/ReductionCartFactoryInterface.php
  44. +18
    -0
      Factory/Reduction/ReductionCatalogFactory.php
  45. +8
    -0
      Factory/Reduction/ReductionCatalogFactoryInterface.php
  46. +18
    -0
      Factory/Reduction/ReductionCreditFactory.php
  47. +8
    -0
      Factory/Reduction/ReductionCreditFactoryInterface.php
  48. +18
    -0
      Factory/Section/SectionFactory.php
  49. +8
    -0
      Factory/Section/SectionFactoryInterface.php
  50. +3
    -2
      Factory/Setting/SectionSettingFactory.php
  51. +21
    -0
      Factory/Site/NewsFactory.php
  52. +23
    -0
      Factory/Site/PageFactory.php
  53. +2
    -1
      Factory/Ticket/TicketFactory.php
  54. +18
    -0
      Factory/User/GroupUserFactory.php
  55. +8
    -0
      Factory/User/GroupUserFactoryInterface.php
  56. +16
    -0
      Factory/User/UserFactory.php
  57. +18
    -0
      Factory/User/VisitorFactory.php
  58. +8
    -0
      Factory/User/VisitorFactoryInterface.php
  59. +0
    -8
      Model/Credit/CreditConfigInterface.php
  60. +0
    -101
      Model/Credit/CreditConfigModel.php
  61. +0
    -19
      Model/Merchant/MerchantModel.php
  62. +0
    -8
      Model/PointSale/PointSaleDayInfoInterface.php
  63. +0
    -81
      Model/PointSale/PointSaleDayInfoModel.php
  64. +0
    -37
      Model/PointSale/PointSaleModel.php

+ 18
- 0
Factory/Address/AddressFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Address;

use App\Entity\Address\Address;
use Lc\CaracoleBundle\Model\Address\AddressInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class AddressFactory extends AbstractFactory implements AddressFactoryInterface
{
public function create(): AddressInterface
{
$address = new Address();

return $address;
}

}

+ 8
- 0
Factory/Address/AddressFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Address;

interface AddressFactoryInterface
{

}

+ 18
- 0
Factory/Config/TaxRateFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Config;

use App\Entity\Config\TaxRate;
use Lc\CaracoleBundle\Model\Config\TaxRateInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class TaxRateFactory extends AbstractFactory implements TaxRateFactoryInterface
{
public function create(): TaxRateInterface
{
$taxRate = new TaxRate();

return $taxRate;
}

}

+ 8
- 0
Factory/Config/TaxRateFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Config;

interface TaxRateFactoryInterface
{

}

+ 18
- 0
Factory/Config/UnitFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Config;

use App\Entity\Config\Unit;
use Lc\CaracoleBundle\Model\Config\UnitInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class UnitFactory extends AbstractFactory implements UnitFactoryInterface
{
public function create(): UnitInterface
{
$unit = new Unit();

return $unit;
}

}

+ 8
- 0
Factory/Config/UnitFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Config;

interface UnitFactoryInterface
{

}

+ 19
- 0
Factory/Credit/CreditHistoryFactory.php Ver arquivo

@@ -0,0 +1,19 @@
<?php

namespace Lc\CaracoleBundle\Factory\Credit;

use App\Entity\Credit\CreditHistory;
use Lc\CaracoleBundle\Factory\CreditHistory\CreditHistoryFactoryInterface;
use Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class CreditHistoryFactory extends AbstractFactory implements CreditHistoryFactoryInterface
{
public function create(): CreditHistoryInterface
{
$creditHistory = new CreditHistory();

return $creditHistory;
}

}

+ 8
- 0
Factory/Credit/CreditHistoryFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Credit;

interface CreditHistoryFactoryInterface
{

}

+ 23
- 0
Factory/File/DocumentFactory.php Ver arquivo

@@ -0,0 +1,23 @@
<?php

namespace Lc\CaracoleBundle\Factory\File;

use App\Entity\File\Document;
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait;
use Lc\CaracoleBundle\Model\File\DocumentInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class DocumentFactory extends AbstractFactory implements DocumentFactoryInterface
{
use MerchantFactoryTrait;

public function create(): DocumentInterface
{
$document = new Document();

$document->setMerchant($this->merchant);

return $document;
}

}

+ 8
- 0
Factory/File/DocumentFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\File;

interface DocumentFactoryInterface
{

}

+ 18
- 0
Factory/Merchant/MerchantFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Merchant;

use App\Entity\Merchant\Merchant;
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class MerchantFactory extends AbstractFactory implements MerchantFactoryInterface
{
public function create(): MerchantInterface
{
$merchant = new Merchant();

return $merchant;
}

}

+ 8
- 0
Factory/Merchant/MerchantFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Merchant;

interface MerchantFactoryInterface
{

}

+ 23
- 0
Factory/Newsletter/NewsletterFactory.php Ver arquivo

@@ -0,0 +1,23 @@
<?php

namespace Lc\CaracoleBundle\Factory\Newsletter;

use App\Entity\Newsletter\Newsletter;
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait;
use Lc\SovBundle\Model\Newsletter\NewsletterInterface;
use Lc\SovBundle\Factory\Newsletter\NewsletterFactory as SovNewsletterFactory;

class NewsletterFactory extends SovNewsletterFactory
{
use MerchantFactoryTrait;

public function create(): NewsletterInterface
{
$newsletter = parent::create();

$newsletter->setMerchant($this->merchant);

return $newsletter;
}

}

+ 18
- 0
Factory/Order/OrderPaymentFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderPayment;
use Lc\CaracoleBundle\Model\Order\OrderPaymentInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderPaymentFactory extends AbstractFactory implements OrderPaymentFactoryInterface
{
public function create(): OrderPaymentInterface
{
$orderPayment = new OrderPayment();

return $orderPayment;
}

}

+ 8
- 0
Factory/Order/OrderPaymentFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderPaymentFactoryInterface
{

}

+ 18
- 0
Factory/Order/OrderProductFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderProduct;
use Lc\CaracoleBundle\Model\Order\OrderProductInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderProductFactory extends AbstractFactory implements OrderProductFactoryInterface
{
public function create(): OrderProductInterface
{
$orderProduct = new OrderProduct();

return $orderProduct;
}

}

+ 8
- 0
Factory/Order/OrderProductFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderProductFactoryInterface
{

}

+ 18
- 0
Factory/Order/OrderProductReductionCatalogFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderProductReductionCatalog;
use Lc\CaracoleBundle\Model\Order\OrderProductReductionCatalogInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderProductReductionCatalogFactory extends AbstractFactory implements OrderProductReductionCatalogFactoryInterface
{
public function create(): OrderProductReductionCatalogInterface
{
$orderProductReductionCatalog = new OrderProductReductionCatalog();

return $orderProductReductionCatalog;
}

}

+ 8
- 0
Factory/Order/OrderProductReductionCatalogFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderProductReductionCatalogFactoryInterface
{

}

+ 18
- 0
Factory/Order/OrderProductRefundFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderProductRefund;
use Lc\CaracoleBundle\Model\Order\OrderProductRefundInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderProductRefundFactory extends AbstractFactory implements OrderProductRefundFactoryInterface
{
public function create(): OrderProductRefundInterface
{
$orderProductRefund = new OrderProductRefund();

return $orderProductRefund;
}

}

+ 8
- 0
Factory/Order/OrderProductRefundFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderProductRefundFactoryInterface
{

}

+ 18
- 0
Factory/Order/OrderReductionCartFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderReductionCart;
use Lc\CaracoleBundle\Model\Order\OrderReductionCartInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderReductionCartFactory extends AbstractFactory implements OrderReductionCartFactoryInterface
{
public function create(): OrderReductionCartInterface
{
$orderReductionCart = new OrderReductionCart();

return $orderReductionCart;
}

}

+ 7
- 0
Factory/Order/OrderReductionCartFactoryInterface.php Ver arquivo

@@ -0,0 +1,7 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderReductionCartFactoryInterface{

}

+ 18
- 0
Factory/Order/OrderReductionCreditFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderReductionCredit;
use Lc\CaracoleBundle\Model\Order\OrderReductionCreditInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderReductionCreditFactory extends AbstractFactory implements OrderReductionCreditFactoryInterface
{
public function create(): OrderReductionCreditInterface
{
$orderReductionCredit = new OrderReductionCredit();

return $orderReductionCredit;
}

}

+ 8
- 0
Factory/Order/OrderReductionCreditFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderReductionCreditFactoryInterface
{

}

+ 18
- 0
Factory/Order/OrderRefundFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderRefund;
use Lc\CaracoleBundle\Model\Order\OrderRefundInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderRefundFactory extends AbstractFactory implements OrderRefundFactoryInterface
{
public function create(): OrderRefundInterface
{
$orderRefund = new OrderRefund();

return $orderRefund;
}

}

+ 8
- 0
Factory/Order/OrderRefundFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderRefundFactoryInterface
{

}

+ 18
- 0
Factory/Order/OrderShopFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderShop;
use Lc\CaracoleBundle\Model\Order\OrderShopInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderShopFactory extends AbstractFactory implements OrderShopFactoryInterface
{
public function create(): OrderShopInterface
{
$orderShop = new OrderShop();

return $orderShop;
}

}

+ 8
- 0
Factory/Order/OrderShopFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderShopFactoryInterface
{

}

+ 18
- 0
Factory/Order/OrderStatusFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderStatus;
use Lc\CaracoleBundle\Model\Order\OrderStatusInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderStatusFactory extends AbstractFactory implements OrderStatusFactoryInterface
{
public function create(): OrderStatusInterface
{
$orderStatus = new OrderStatus();

return $orderStatus;
}

}

+ 8
- 0
Factory/Order/OrderStatusFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderStatusFactoryInterface
{

}

+ 18
- 0
Factory/Order/OrderStatusHistoryFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

use App\Entity\Order\OrderStatusHistory;
use Lc\CaracoleBundle\Model\Order\OrderStatusHistoryInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class OrderStatusHistoryFactory extends AbstractFactory implements OrderStatusHistoryFactoryInterface
{
public function create(): OrderStatusHistoryInterface
{
$orderStatusHistory = new OrderStatusHistory();

return $orderStatusHistory;
}

}

+ 8
- 0
Factory/Order/OrderStatusHistoryFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Order;

interface OrderStatusHistoryFactoryInterface
{

}

+ 18
- 0
Factory/PointSale/PointSaleFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\PointSale;

use App\Entity\PointSale\PointSale;
use Lc\CaracoleBundle\Model\PointSale\PointSaleInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class PointSaleFactory extends AbstractFactory implements PointSaleFactoryInterface
{
public function create(): PointSaleInterface
{
$pointSale = new PointSale();

return $pointSale;
}

}

+ 8
- 0
Factory/PointSale/PointSaleFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\PointSale;

interface PointSaleFactoryInterface
{

}

+ 18
- 0
Factory/Product/ProductCategoryFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Product;

use App\Entity\Product\ProductCategory;
use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class ProductCategoryFactory extends AbstractFactory implements ProductCategoryFactoryInterface
{
public function create(): ProductCategoryInterface
{
$productCategory = new ProductCategory();

return $productCategory;
}

}

+ 8
- 0
Factory/Product/ProductCategoryFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Product;

interface ProductCategoryFactoryInterface
{

}

+ 18
- 0
Factory/Product/ProductFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Product;

use App\Entity\Product\Product;
use Lc\CaracoleBundle\Model\Product\ProductInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class ProductFactory extends AbstractFactory implements ProductFactoryInterface
{
public function create(): ProductInterface
{
$product = new Product();

return $product;
}

}

+ 8
- 0
Factory/Product/ProductFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Product;

interface ProductFactoryInterface
{

}

+ 18
- 0
Factory/Product/ProductFamilyFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Product;

use App\Entity\Product\ProductFamily;
use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class ProductFamilyFactory extends AbstractFactory implements ProductFamilyFactoryInterface
{
public function create(): ProductFamilyInterface
{
$productFamily = new ProductFamily();

return $productFamily;
}

}

+ 8
- 0
Factory/Product/ProductFamilyFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Product;

interface ProductFamilyFactoryInterface
{

}

+ 18
- 0
Factory/Reduction/ReductionCartFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Reduction;

use App\Entity\Reduction\ReductionCart;
use Lc\CaracoleBundle\Model\Reduction\ReductionCartInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class ReductionCartFactory extends AbstractFactory implements ReductionCartFactoryInterface
{
public function create(): ReductionCartInterface
{
$reductionCart = new ReductionCart();

return $reductionCart;
}

}

+ 8
- 0
Factory/Reduction/ReductionCartFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Reduction;

interface ReductionCartFactoryInterface
{

}

+ 18
- 0
Factory/Reduction/ReductionCatalogFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Reduction;

use App\Entity\Reduction\ReductionCatalog;
use Lc\CaracoleBundle\Model\Reduction\ReductionCatalogInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class ReductionCatalogFactory extends AbstractFactory implements ReductionCatalogFactoryInterface
{
public function create(): ReductionCatalogInterface
{
$reductionCatalog = new ReductionCatalog();

return $reductionCatalog;
}

}

+ 8
- 0
Factory/Reduction/ReductionCatalogFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Reduction;

interface ReductionCatalogFactoryInterface
{

}

+ 18
- 0
Factory/Reduction/ReductionCreditFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Reduction;

use App\Entity\Reduction\ReductionCredit;
use Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class ReductionCreditFactory extends AbstractFactory implements ReductionCreditFactoryInterface
{
public function create(): ReductionCreditInterface
{
$reductionCredit = new ReductionCredit();

return $reductionCredit;
}

}

+ 8
- 0
Factory/Reduction/ReductionCreditFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Reduction;

interface ReductionCreditFactoryInterface
{

}

+ 18
- 0
Factory/Section/SectionFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\Section;

use App\Entity\Section\Section;
use Lc\CaracoleBundle\Model\Section\SectionInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class SectionFactory extends AbstractFactory implements SectionFactoryInterface
{
public function create(): SectionInterface
{
$section = new Section();

return $section;
}

}

+ 8
- 0
Factory/Section/SectionFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\Section;

interface SectionFactoryInterface
{

}

+ 3
- 2
Factory/Setting/SectionSettingFactory.php Ver arquivo

@@ -4,17 +4,18 @@ namespace Lc\CaracoleBundle\Factory\Setting;

use App\Entity\Setting\SectionSetting;
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait;
use Lc\CaracoleBundle\Factory\SectionFactoryTrait;
use Lc\SovBundle\Factory\AbstractFactory;

class SectionSettingFactory extends AbstractFactory
{
use MerchantFactoryTrait;
use SectionFactoryTrait;

public function create()
{
$sectionSetting = new SectionSetting();

$sectionSetting->setMerchant($this->merchant);
$sectionSetting->setSection($this->section);

return $sectionSetting;
}

+ 21
- 0
Factory/Site/NewsFactory.php Ver arquivo

@@ -0,0 +1,21 @@
<?php

namespace Lc\CaracoleBundle\Factory\Site;

use Lc\CaracoleBundle\Factory\MerchantFactoryTrait;
use Lc\SovBundle\Factory\Site\NewsFactory as SovNewsFactory;
use Lc\SovBundle\Model\Site\NewsInterface;

class NewsFactory extends SovNewsFactory
{
use MerchantFactoryTrait;

public function create(): NewsInterface
{
$news = parent::create();

$news->setMerchant($this->merchant);

return $news;
}
}

+ 23
- 0
Factory/Site/PageFactory.php Ver arquivo

@@ -0,0 +1,23 @@
<?php

namespace Lc\CaracoleBundle\Factory\Site;

use Lc\CaracoleBundle\Factory\MerchantFactoryTrait;
use Lc\CaracoleBundle\Factory\SectionFactoryTrait;
use Lc\SovBundle\Factory\Site\PageFactory as SovPageFactory;
use Lc\SovBundle\Model\Site\PageInterface;

class PageFactory extends SovPageFactory
{
use MerchantFactoryTrait;
use SectionFactoryTrait;

public function create(): PageInterface
{
$page = parent::create();

$page->setMerchant($this->merchant);

return $page;
}
}

+ 2
- 1
Factory/Ticket/TicketFactory.php Ver arquivo

@@ -5,12 +5,13 @@ namespace Lc\CaracoleBundle\Factory\Ticket;
use Lc\CaracoleBundle\Factory\MerchantFactoryTrait;
use Lc\CaracoleBundle\Factory\SectionFactoryTrait;
use Lc\SovBundle\Factory\Ticket\TicketFactory as SovTicketFactory;
use Lc\SovBundle\Model\Ticket\TicketInterface;

class TicketFactory extends SovTicketFactory
{
use MerchantFactoryTrait;

public function create()
public function create(): TicketInterface
{
$ticket = parent::create();


+ 18
- 0
Factory/User/GroupUserFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\User;

use App\Entity\User\GroupUser;
use Lc\SovBundle\Factory\AbstractFactory;
use Lc\SovBundle\Model\User\GroupUserInterface;

class GroupUserFactory extends AbstractFactory implements GroupUserFactoryInterface
{
public function create(): GroupUserInterface
{
$groupUser = new GroupUser();

return $groupUser;
}

}

+ 8
- 0
Factory/User/GroupUserFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\User;

interface GroupUserFactoryInterface
{

}

+ 16
- 0
Factory/User/UserFactory.php Ver arquivo

@@ -0,0 +1,16 @@
<?php

namespace Lc\CaracoleBundle\Factory\User;

use Lc\SovBundle\Factory\User\UserFactory as SovUserFactory;
use Lc\SovBundle\Model\User\UserInterface;

class UserFactory extends SovUserFactory
{
public function create(): UserInterface
{
$user = parent::create();

return $user;
}
}

+ 18
- 0
Factory/User/VisitorFactory.php Ver arquivo

@@ -0,0 +1,18 @@
<?php

namespace Lc\CaracoleBundle\Factory\User;

use App\Entity\User\Visitor;
use Lc\CaracoleBundle\Model\User\VisitorInterface;
use Lc\SovBundle\Factory\AbstractFactory;

class VisitorFactory extends AbstractFactory implements VisitorFactoryInterface
{
public function create(): VisitorInterface
{
$visitor = new Visitor();

return $visitor;
}

}

+ 8
- 0
Factory/User/VisitorFactoryInterface.php Ver arquivo

@@ -0,0 +1,8 @@
<?php

namespace Lc\CaracoleBundle\Factory\User;

interface VisitorFactoryInterface
{

}

+ 0
- 8
Model/Credit/CreditConfigInterface.php Ver arquivo

@@ -1,8 +0,0 @@
<?php

namespace Lc\CaracoleBundle\Model\Credit;

interface CreditConfigInterface
{

}

+ 0
- 101
Model/Credit/CreditConfigModel.php Ver arquivo

@@ -1,101 +0,0 @@
<?php

namespace Lc\CaracoleBundle\Model\Credit;

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\MappedSuperclass()
*/
abstract class CreditConfigModel
{
/**
* @ORM\Column(type="boolean")
*/
protected $active;

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

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

/**
* @ORM\Column(type="string", length=31, nullable=true)
*/
protected $behavior;

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

public function __toString()
{
return '';
}

public function getActive(): ?bool
{
return $this->active;
}

public function setActive(bool $active): self
{
$this->active = $active;

return $this;
}

public function getLimitAmount(): ?float
{
return $this->limitAmount;
}

public function setLimitAmount(?float $limitAmount): self
{
$this->limitAmount = $limitAmount;

return $this;
}

public function getLimitReminder(): ?float
{
return $this->limitReminder;
}

public function setLimitReminder(?float $limitReminder): self
{
$this->limitReminder = $limitReminder;

return $this;
}

public function getBehavior(): ?string
{
return $this->behavior;
}

public function setBehavior(?string $behavior): self
{
$this->behavior = $behavior;

return $this;
}

public function getProcessOrderCheckedDefault(): ?bool
{
return $this->processOrderCheckedDefault;
}

public function setProcessOrderCheckedDefault(?bool $processOrderCheckedDefault): self
{
$this->processOrderCheckedDefault = $processOrderCheckedDefault;

return $this;
}
}

+ 0
- 19
Model/Merchant/MerchantModel.php Ver arquivo

@@ -7,7 +7,6 @@ use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Lc\CaracoleBundle\Model\Address\AddressInterface;
use Lc\CaracoleBundle\Model\Config\TaxRateInterface;
use Lc\CaracoleBundle\Model\Credit\CreditConfigInterface;
use Lc\SovBundle\Model\Newsletter\NewsletterInterface;
use Lc\CaracoleBundle\Model\PointSale\PointSaleInterface;
use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface;
@@ -27,12 +26,6 @@ abstract class MerchantModel extends AbstractFullEntity

use EntitySettingTrait;

/**
* @ORM\OneToOne(targetEntity="Lc\CaracoleBundle\Model\Credit\CreditConfigInterface", cascade={"persist", "remove"})
* @ORM\JoinColumn(nullable=true)
*/
protected $creditConfig;

/**
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Config\TaxRateInterface")
* @ORM\JoinColumn(nullable=false)
@@ -101,18 +94,6 @@ abstract class MerchantModel extends AbstractFullEntity
return $this->getTitle() ;
}

public function getCreditConfig(): ?CreditConfigInterface
{
return $this->creditConfig;
}

public function setCreditConfig(CreditConfigInterface $creditConfig): self
{
$this->creditConfig = $creditConfig;

return $this;
}

public function getTaxRate(): ?TaxRateInterface
{
return $this->taxRate;

+ 0
- 8
Model/PointSale/PointSaleDayInfoInterface.php Ver arquivo

@@ -1,8 +0,0 @@
<?php

namespace Lc\CaracoleBundle\Model\PointSale;

interface PointSaleDayInfoInterface
{

}

+ 0
- 81
Model/PointSale/PointSaleDayInfoModel.php Ver arquivo

@@ -1,81 +0,0 @@
<?php

namespace Lc\CaracoleBundle\Model\PointSale;

use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\Pattern\AbstractLightEntity;

/**
* @ORM\MappedSuperclass()
*/
abstract class PointSaleDayInfoModel extends AbstractLightEntity
{
/**
* @ORM\Column(type="boolean")
*/
protected $active;

/**
* @ORM\Column(type="smallint")
*/
protected $day;

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

/**
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\PointSale\PointSaleInterface", inversedBy="pointSaleDayInfos")
* @ORM\JoinColumn(nullable=false)
*/
protected $pointSale;

public function getActive(): ?bool
{
return $this->active;
}

public function setActive(bool $active): self
{
$this->active = $active;

return $this;
}

public function getDay(): ?int
{
return $this->day;
}

public function setDay(int $day): self
{
$this->day = $day;

return $this;
}

public function getDescription(): ?string
{
return $this->description;
}

public function setDescription(?string $description): self
{
$this->description = $description;

return $this;
}

public function getPointSale(): ?PointSaleInterface
{
return $this->pointSale;
}

public function setPointSale(?PointSaleInterface $pointSale): self
{
$this->pointSale = $pointSale;

return $this;
}
}

+ 0
- 37
Model/PointSale/PointSaleModel.php Ver arquivo

@@ -32,11 +32,6 @@ abstract class PointSaleModel extends AbstractFullEntity implements FilterMultip
*/
protected $code;

/**
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\PointSale\PointSaleDayInfoInterface", mappedBy="pointSale", orphanRemoval=true)
*/
protected $pointSaleDayInfos;

/**
* @ORM\OneToOne(targetEntity="Lc\CaracoleBundle\Model\Address\AddressInterface", inversedBy="pointSale", cascade={"persist", "remove"})
* @ORM\JoinColumn(nullable=false)
@@ -52,7 +47,6 @@ abstract class PointSaleModel extends AbstractFullEntity implements FilterMultip
public function __construct()
{
$this->merchants = new ArrayCollection();
$this->pointSaleDayInfos = new ArrayCollection();
$this->userPointSales = new ArrayCollection();
}

@@ -104,37 +98,6 @@ abstract class PointSaleModel extends AbstractFullEntity implements FilterMultip
return $this;
}

/**
* @return Collection|PointSaleDayInfoInterface[]
*/
public function getPointSaleDayInfos(): Collection
{
return $this->pointSaleDayInfos;
}

public function addPointSaleDayInfo(PointSaleDayInfoInterface $pointSaleDayInfo): self
{
if (!$this->pointSaleDayInfos->contains($pointSaleDayInfo)) {
$this->pointSaleDayInfos[] = $pointSaleDayInfo;
$pointSaleDayInfo->setPointSale($this);
}

return $this;
}

public function removePointSaleDayInfo(PointSaleDayInfoInterface $pointSaleDayInfo): self
{
if ($this->pointSaleDayInfos->contains($pointSaleDayInfo)) {
$this->pointSaleDayInfos->removeElement($pointSaleDayInfo);
// set the owning side to null (unless already changed)
if ($pointSaleDayInfo->getPointSale() === $this) {
$pointSaleDayInfo->setPointSale(null);
}
}

return $this;
}

public function getAddress(): ?AddressInterface
{
return $this->address;

Carregando…
Cancelar
Salvar