ltsecurityinc安防产品在线商城代码

This commit is contained in:
2026-09-14 17:47:10 +08:00
parent 57d8444c15
commit 6a3c9c5bd8
14539 changed files with 1775310 additions and 0 deletions
@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
/**
* @author Amasty Team
* @copyright Copyright (c) Amasty (https://www.amasty.com)
* @package Admin Actions Log for Magento 2
*/
namespace Amasty\AdminActionsLog\Model\LogEntry\ResourceModel;
use Amasty\AdminActionsLog\Model\LogEntry\LogEntry as LogEntryModel;
use Amasty\AdminActionsLog\Model\LogEntry\ResourceModel\LogEntry as LogEntryResource;
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
class Collection extends AbstractCollection
{
public function _construct()
{
$this->_init(LogEntryModel::class, LogEntryResource::class);
$this->_setIdFieldName($this->getResource()->getIdFieldName());
}
}
@@ -0,0 +1,44 @@
<?php
declare(strict_types=1);
/**
* @author Amasty Team
* @copyright Copyright (c) Amasty (https://www.amasty.com)
* @package Admin Actions Log for Magento 2
*/
namespace Amasty\AdminActionsLog\Model\LogEntry\ResourceModel\Grid;
use Amasty\AdminActionsLog\Model\LogEntry\ResourceModel\LogEntry as LogEntryResource;
use Magento\Framework\View\Element\UiComponent\DataProvider\Document;
use Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult;
class Collection extends SearchResult
{
public const ADMIN_TABLE_ALIAS = 'amasty_admin_user';
public const FULL_NAME_EXPR = "CONCAT(amasty_admin_user.firstname, ' ' ,amasty_admin_user.lastname)";
protected function _construct()
{
$this->_init(Document::class, LogEntryResource::class);
$this->setMainTable(LogEntryResource::TABLE_NAME);
$this->addFilterToMap('full_name', new \Zend_Db_Expr(self::FULL_NAME_EXPR));
$this->addFilterToMap('username', 'main_table.username');
}
protected function _initSelect()
{
parent::_initSelect();
$this->getSelect()->joinLeft(
[self::ADMIN_TABLE_ALIAS => $this->getTable('admin_user')],
'main_table.username = ' . self::ADMIN_TABLE_ALIAS . '.username',
[
'full_name' => new \Zend_Db_Expr(self::FULL_NAME_EXPR),
'email' => self::ADMIN_TABLE_ALIAS . '.email',
]
);
return $this;
}
}
@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
/**
* @author Amasty Team
* @copyright Copyright (c) Amasty (https://www.amasty.com)
* @package Admin Actions Log for Magento 2
*/
namespace Amasty\AdminActionsLog\Model\LogEntry\ResourceModel;
use Amasty\AdminActionsLog\Model\LogEntry\LogDetail as LogDetailModel;
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
class LogDetail extends AbstractDb
{
public const TABLE_NAME = 'amasty_audit_log_details';
protected function _construct()
{
$this->_init(self::TABLE_NAME, LogDetailModel::ID);
}
}
@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
/**
* @author Amasty Team
* @copyright Copyright (c) Amasty (https://www.amasty.com)
* @package Admin Actions Log for Magento 2
*/
namespace Amasty\AdminActionsLog\Model\LogEntry\ResourceModel;
use Amasty\AdminActionsLog\Model\LogEntry\LogDetail as LogDetailModel;
use Amasty\AdminActionsLog\Model\LogEntry\ResourceModel\LogDetail as LogDetailResource;
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
class LogDetailCollection extends AbstractCollection
{
public function _construct()
{
$this->_init(LogDetailModel::class, LogDetailResource::class);
$this->_setIdFieldName($this->getResource()->getIdFieldName());
}
}
@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
/**
* @author Amasty Team
* @copyright Copyright (c) Amasty (https://www.amasty.com)
* @package Admin Actions Log for Magento 2
*/
namespace Amasty\AdminActionsLog\Model\LogEntry\ResourceModel;
use Amasty\AdminActionsLog\Model\LogEntry\LogEntry as LogEntryModel;
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
class LogEntry extends AbstractDb
{
public const TABLE_NAME = 'amasty_audit_log_entry';
protected function _construct()
{
$this->_init(self::TABLE_NAME, LogEntryModel::ID);
}
}