init
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Esun\Catalog\Model\ResourceModel;
|
||||
|
||||
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
|
||||
|
||||
class CertificationType extends AbstractDb
|
||||
{
|
||||
protected function _construct(): void
|
||||
{
|
||||
$this->_init('esun_catalog_certification_type', 'type_id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Esun\Catalog\Model\ResourceModel\CertificationType;
|
||||
|
||||
use Esun\Catalog\Model\CertificationType;
|
||||
use Esun\Catalog\Model\ResourceModel\CertificationType as CertificationTypeResource;
|
||||
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
|
||||
|
||||
class Collection extends AbstractCollection
|
||||
{
|
||||
protected function _construct(): void
|
||||
{
|
||||
$this->_init(CertificationType::class, CertificationTypeResource::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Esun\Catalog\Model\ResourceModel;
|
||||
|
||||
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
|
||||
|
||||
class ColorOption extends AbstractDb
|
||||
{
|
||||
protected function _construct(): void
|
||||
{
|
||||
$this->_init('esun_catalog_color_option', 'entity_id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Esun\Catalog\Model\ResourceModel\ColorOption;
|
||||
|
||||
use Esun\Catalog\Model\ColorOption;
|
||||
use Esun\Catalog\Model\ResourceModel\ColorOption as ColorOptionResource;
|
||||
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
|
||||
|
||||
class Collection extends AbstractCollection
|
||||
{
|
||||
protected function _construct(): void
|
||||
{
|
||||
$this->_init(ColorOption::class, ColorOptionResource::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Esun\Catalog\Model\ResourceModel;
|
||||
|
||||
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
|
||||
|
||||
class Faq extends AbstractDb
|
||||
{
|
||||
protected function _construct(): void
|
||||
{
|
||||
$this->_init('esun_catalog_faq', 'faq_id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Esun\Catalog\Model\ResourceModel\Faq;
|
||||
|
||||
use Esun\Catalog\Model\Faq;
|
||||
use Esun\Catalog\Model\ResourceModel\Faq as FaqResource;
|
||||
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
|
||||
|
||||
class Collection extends AbstractCollection
|
||||
{
|
||||
protected function _construct(): void
|
||||
{
|
||||
$this->_init(Faq::class, FaqResource::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Esun\Catalog\Model\ResourceModel;
|
||||
|
||||
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
|
||||
|
||||
class SpecificationBrand extends AbstractDb
|
||||
{
|
||||
protected function _construct(): void
|
||||
{
|
||||
$this->_init('esun_catalog_specification_brand', 'brand_id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Esun\Catalog\Model\ResourceModel\SpecificationBrand;
|
||||
|
||||
use Esun\Catalog\Model\ResourceModel\SpecificationBrand as SpecificationBrandResource;
|
||||
use Esun\Catalog\Model\SpecificationBrand;
|
||||
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
|
||||
|
||||
class Collection extends AbstractCollection
|
||||
{
|
||||
protected function _construct(): void
|
||||
{
|
||||
$this->_init(SpecificationBrand::class, SpecificationBrandResource::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Esun\Catalog\Model\ResourceModel;
|
||||
|
||||
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
|
||||
|
||||
class SpecificationFile extends AbstractDb
|
||||
{
|
||||
protected function _construct(): void
|
||||
{
|
||||
$this->_init('esun_catalog_specification_file', 'file_id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Esun\Catalog\Model\ResourceModel\SpecificationFile;
|
||||
|
||||
use Esun\Catalog\Model\ResourceModel\SpecificationFile as SpecificationFileResource;
|
||||
use Esun\Catalog\Model\SpecificationFile;
|
||||
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
|
||||
|
||||
class Collection extends AbstractCollection
|
||||
{
|
||||
protected function _construct(): void
|
||||
{
|
||||
$this->_init(SpecificationFile::class, SpecificationFileResource::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Esun\Catalog\Model\ResourceModel;
|
||||
|
||||
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
|
||||
|
||||
class SpecificationImport extends AbstractDb
|
||||
{
|
||||
protected function _construct(): void
|
||||
{
|
||||
$this->_init('esun_catalog_specification_import', 'import_id');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Esun\Catalog\Model\ResourceModel\SpecificationImport;
|
||||
|
||||
use Esun\Catalog\Model\ResourceModel\SpecificationImport as SpecificationImportResource;
|
||||
use Esun\Catalog\Model\SpecificationImport;
|
||||
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
|
||||
|
||||
class Collection extends AbstractCollection
|
||||
{
|
||||
protected function _initSelect(): void
|
||||
{
|
||||
parent::_initSelect();
|
||||
$this->getSelect()->joinLeft(
|
||||
['brand' => $this->getTable('esun_catalog_specification_brand')],
|
||||
'main_table.brand_id = brand.brand_id',
|
||||
['brand_name' => 'brand.brand_name']
|
||||
);
|
||||
$this->addFilterToMap('import_id', 'main_table.import_id');
|
||||
$this->addFilterToMap('brand_id', 'main_table.brand_id');
|
||||
$this->addFilterToMap('archive_file', 'main_table.archive_file');
|
||||
$this->addFilterToMap('file_count', 'main_table.file_count');
|
||||
$this->addFilterToMap('status', 'main_table.status');
|
||||
$this->addFilterToMap('updated_at', 'main_table.updated_at');
|
||||
}
|
||||
|
||||
protected function _construct(): void
|
||||
{
|
||||
$this->_init(SpecificationImport::class, SpecificationImportResource::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user