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,27 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\TestSetupDeclarationModule2\Setup;
use Magento\Framework\Setup\InstallSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
/**
* InstallSchema mock class.
*/
class InstallSchema implements InstallSchemaInterface
{
/**
* {@inheritdoc}
*/
public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
{
$installer = $setup;
$installer->startSetup();
$installer->endSetup();
}
}
@@ -0,0 +1,51 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
<table name="test_table_one" resource="shard_one">
<column xsi:type="smallint" identity="true" name="smallint" padding="3" nullable="true"/>
<column xsi:type="varchar" name="varchar" length="254" nullable="true"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="smallint" />
</constraint>
</table>
<table name="test_table_two" resource="shard_two">
<column xsi:type="smallint" identity="true" name="smallint" padding="3" nullable="true"/>
<column xsi:type="varchar" name="varchar" length="254" nullable="true"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="smallint" />
</constraint>
</table>
<table name="reference_table" resource="default">
<column xsi:type="tinyint" name="tinyint_ref" padding="7" nullable="false" identity="true" unsigned="false"/>
<column xsi:type="tinyint" name="tinyint_without_padding" default="0" nullable="false" unsigned="false"/>
<column xsi:type="bigint" name="bigint_without_padding" default="0" nullable="false" unsigned="false"/>
<column xsi:type="smallint" name="smallint_without_padding" default="0" nullable="false" unsigned="false"/>
<column xsi:type="int" name="integer_without_padding" default="0" nullable="false" unsigned="false"/>
<column xsi:type="smallint" name="smallint_with_big_padding" padding="254" default="0" nullable="false"
unsigned="false"/>
<column xsi:type="smallint" name="smallint_without_default" padding="2" nullable="true" unsigned="false"/>
<column xsi:type="int" name="int_without_unsigned" padding="2" nullable="true"/>
<column xsi:type="int" name="int_unsigned" padding="2" nullable="true" unsigned="true"/>
<column xsi:type="bigint" name="bigint_default_nullable" padding="2" nullable="true" default="1"
unsigned="true"/>
<column xsi:type="bigint" name="bigint_not_default_not_nullable" padding="2" nullable="false" unsigned="true"/>
<constraint xsi:type="primary" referenceId="tinyint_primary">
<column name="tinyint_ref"/>
</constraint>
</table>
<table name="auto_increment_test" resource="default">
<column xsi:type="int" name="int_auto_increment_with_nullable" identity="true" padding="12" unsigned="true"
nullable="true"/>
<column xsi:type="smallint" name="int_disabled_auto_increment" default="0" identity="false" padding="12"
unsigned="true" nullable="true"/>
<constraint xsi:type="unique" referenceId="AUTO_INCREMENT_TEST_INT_AUTO_INCREMENT_WITH_NULLABLE">
<column name="int_auto_increment_with_nullable"/>
</constraint>
</table>
</schema>
@@ -0,0 +1,14 @@
{
"test_table_one": {
"column": []
},
"test_table_two": {
"column": []
},
"reference_table": {
"column": []
},
"auto_increment_test": {
"column": []
}
}
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Framework\Setup\Declaration\Schema\Sharding">
<arguments>
<argument name="resources" xsi:type="array">
<item name="default" xsi:type="string">default</item>
<item name="shard_one" xsi:type="string">shard_one</item>
<item name="shard_two" xsi:type="string">shard_two</item>
</argument>
</arguments>
</type>
</config>
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Magento_TestSetupDeclarationModule2" setup_version="2.0.1"/>
</config>
@@ -0,0 +1,36 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
return [
'test_table_one' => 'CREATE TABLE `test_table_one` (
`smallint` smallint(6) NOT NULL AUTO_INCREMENT,
`varchar` varchar(254) DEFAULT NULL,
PRIMARY KEY (`smallint`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8',
'test_table_two' => 'CREATE TABLE `test_table_two` (
`smallint` smallint(6) NOT NULL AUTO_INCREMENT,
`varchar` varchar(254) DEFAULT NULL,
PRIMARY KEY (`smallint`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8',
'reference_table' => 'CREATE TABLE `reference_table` (
`tinyint_ref` tinyint(4) NOT NULL AUTO_INCREMENT,
`tinyint_without_padding` tinyint(4) NOT NULL DEFAULT 0,
`bigint_without_padding` bigint(20) NOT NULL DEFAULT 0,
`smallint_without_padding` smallint(6) NOT NULL DEFAULT 0,
`integer_without_padding` int(11) NOT NULL DEFAULT 0,
`smallint_with_big_padding` smallint(6) NOT NULL DEFAULT 0,
`smallint_without_default` smallint(6) DEFAULT NULL,
`int_without_unsigned` int(11) DEFAULT NULL,
`int_unsigned` int(10) unsigned DEFAULT NULL,
`bigint_default_nullable` bigint(20) unsigned DEFAULT 1,
`bigint_not_default_not_nullable` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`tinyint_ref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8',
'auto_increment_test' => 'CREATE TABLE `auto_increment_test` (
`int_auto_increment_with_nullable` int(10) unsigned NOT NULL AUTO_INCREMENT,
`int_disabled_auto_increment` smallint(5) unsigned DEFAULT 0,
UNIQUE KEY `AUTO_INCREMENT_TEST_INT_AUTO_INCREMENT_WITH_NULLABLE` (`int_auto_increment_with_nullable`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8'
];
@@ -0,0 +1,38 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);
return [
'test_table_one' => 'CREATE TABLE `test_table_one` (
`smallint` smallint(6) NOT NULL AUTO_INCREMENT,
`varchar` varchar(254) DEFAULT NULL,
PRIMARY KEY (`smallint`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci',
'test_table_two' => 'CREATE TABLE `test_table_two` (
`smallint` smallint(6) NOT NULL AUTO_INCREMENT,
`varchar` varchar(254) DEFAULT NULL,
PRIMARY KEY (`smallint`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci',
'reference_table' => 'CREATE TABLE `reference_table` (
`tinyint_ref` tinyint(4) NOT NULL AUTO_INCREMENT,
`tinyint_without_padding` tinyint(4) NOT NULL DEFAULT 0,
`bigint_without_padding` bigint(20) NOT NULL DEFAULT 0,
`smallint_without_padding` smallint(6) NOT NULL DEFAULT 0,
`integer_without_padding` int(11) NOT NULL DEFAULT 0,
`smallint_with_big_padding` smallint(6) NOT NULL DEFAULT 0,
`smallint_without_default` smallint(6) DEFAULT NULL,
`int_without_unsigned` int(11) DEFAULT NULL,
`int_unsigned` int(10) unsigned DEFAULT NULL,
`bigint_default_nullable` bigint(20) unsigned DEFAULT 1,
`bigint_not_default_not_nullable` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`tinyint_ref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci',
'auto_increment_test' => 'CREATE TABLE `auto_increment_test` (
`int_auto_increment_with_nullable` int(10) unsigned NOT NULL AUTO_INCREMENT,
`int_disabled_auto_increment` smallint(5) unsigned DEFAULT 0,
UNIQUE KEY `AUTO_INCREMENT_TEST_INT_AUTO_INCREMENT_WITH_NULLABLE` (`int_auto_increment_with_nullable`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci'
];
@@ -0,0 +1,38 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);
return [
'test_table_one' => 'CREATE TABLE `test_table_one` (
`smallint` smallint(6) NOT NULL AUTO_INCREMENT,
`varchar` varchar(254) DEFAULT NULL,
PRIMARY KEY (`smallint`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3',
'test_table_two' => 'CREATE TABLE `test_table_two` (
`smallint` smallint(6) NOT NULL AUTO_INCREMENT,
`varchar` varchar(254) DEFAULT NULL,
PRIMARY KEY (`smallint`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3',
'reference_table' => 'CREATE TABLE `reference_table` (
`tinyint_ref` tinyint(4) NOT NULL AUTO_INCREMENT,
`tinyint_without_padding` tinyint(4) NOT NULL DEFAULT 0,
`bigint_without_padding` bigint(20) NOT NULL DEFAULT 0,
`smallint_without_padding` smallint(6) NOT NULL DEFAULT 0,
`integer_without_padding` int(11) NOT NULL DEFAULT 0,
`smallint_with_big_padding` smallint(6) NOT NULL DEFAULT 0,
`smallint_without_default` smallint(6) DEFAULT NULL,
`int_without_unsigned` int(11) DEFAULT NULL,
`int_unsigned` int(10) unsigned DEFAULT NULL,
`bigint_default_nullable` bigint(20) unsigned DEFAULT 1,
`bigint_not_default_not_nullable` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`tinyint_ref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3',
'auto_increment_test' => 'CREATE TABLE `auto_increment_test` (
`int_auto_increment_with_nullable` int(10) unsigned NOT NULL AUTO_INCREMENT,
`int_disabled_auto_increment` smallint(5) unsigned DEFAULT 0,
UNIQUE KEY `AUTO_INCREMENT_TEST_INT_AUTO_INCREMENT_WITH_NULLABLE` (`int_auto_increment_with_nullable`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3'
];
@@ -0,0 +1,38 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);
return [
'test_table_one' => 'CREATE TABLE `test_table_one` (
`smallint` smallint(6) NOT NULL AUTO_INCREMENT,
`varchar` varchar(254) DEFAULT NULL,
PRIMARY KEY (`smallint`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci',
'test_table_two' => 'CREATE TABLE `test_table_two` (
`smallint` smallint(6) NOT NULL AUTO_INCREMENT,
`varchar` varchar(254) DEFAULT NULL,
PRIMARY KEY (`smallint`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci',
'reference_table' => 'CREATE TABLE `reference_table` (
`tinyint_ref` tinyint(4) NOT NULL AUTO_INCREMENT,
`tinyint_without_padding` tinyint(4) NOT NULL DEFAULT 0,
`bigint_without_padding` bigint(20) NOT NULL DEFAULT 0,
`smallint_without_padding` smallint(6) NOT NULL DEFAULT 0,
`integer_without_padding` int(11) NOT NULL DEFAULT 0,
`smallint_with_big_padding` smallint(6) NOT NULL DEFAULT 0,
`smallint_without_default` smallint(6) DEFAULT NULL,
`int_without_unsigned` int(11) DEFAULT NULL,
`int_unsigned` int(10) unsigned DEFAULT NULL,
`bigint_default_nullable` bigint(20) unsigned DEFAULT 1,
`bigint_not_default_not_nullable` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`tinyint_ref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci',
'auto_increment_test' => 'CREATE TABLE `auto_increment_test` (
`int_auto_increment_with_nullable` int(10) unsigned NOT NULL AUTO_INCREMENT,
`int_disabled_auto_increment` smallint(5) unsigned DEFAULT 0,
UNIQUE KEY `AUTO_INCREMENT_TEST_INT_AUTO_INCREMENT_WITH_NULLABLE` (`int_auto_increment_with_nullable`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci'
];
@@ -0,0 +1,36 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
return [
'test_table_one' => 'CREATE TABLE `test_table_one` (
`smallint` smallint NOT NULL AUTO_INCREMENT,
`varchar` varchar(254) DEFAULT NULL,
PRIMARY KEY (`smallint`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3',
'test_table_two' => 'CREATE TABLE `test_table_two` (
`smallint` smallint NOT NULL AUTO_INCREMENT,
`varchar` varchar(254) DEFAULT NULL,
PRIMARY KEY (`smallint`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3',
'reference_table' => 'CREATE TABLE `reference_table` (
`tinyint_ref` tinyint NOT NULL AUTO_INCREMENT,
`tinyint_without_padding` tinyint NOT NULL DEFAULT \'0\',
`bigint_without_padding` bigint NOT NULL DEFAULT \'0\',
`smallint_without_padding` smallint NOT NULL DEFAULT \'0\',
`integer_without_padding` int NOT NULL DEFAULT \'0\',
`smallint_with_big_padding` smallint NOT NULL DEFAULT \'0\',
`smallint_without_default` smallint DEFAULT NULL,
`int_without_unsigned` int DEFAULT NULL,
`int_unsigned` int unsigned DEFAULT NULL,
`bigint_default_nullable` bigint unsigned DEFAULT \'1\',
`bigint_not_default_not_nullable` bigint unsigned NOT NULL,
PRIMARY KEY (`tinyint_ref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3',
'auto_increment_test' => 'CREATE TABLE `auto_increment_test` (
`int_auto_increment_with_nullable` int unsigned NOT NULL AUTO_INCREMENT,
`int_disabled_auto_increment` smallint unsigned DEFAULT \'0\',
UNIQUE KEY `AUTO_INCREMENT_TEST_INT_AUTO_INCREMENT_WITH_NULLABLE` (`int_auto_increment_with_nullable`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3'
];
@@ -0,0 +1,38 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);
return [
'test_table_one' => 'CREATE TABLE `test_table_one` (
`smallint` smallint NOT NULL AUTO_INCREMENT,
`varchar` varchar(254) DEFAULT NULL,
PRIMARY KEY (`smallint`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3',
'test_table_two' => 'CREATE TABLE `test_table_two` (
`smallint` smallint NOT NULL AUTO_INCREMENT,
`varchar` varchar(254) DEFAULT NULL,
PRIMARY KEY (`smallint`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3',
'reference_table' => 'CREATE TABLE `reference_table` (
`tinyint_ref` tinyint NOT NULL AUTO_INCREMENT,
`tinyint_without_padding` tinyint NOT NULL DEFAULT \'0\',
`bigint_without_padding` bigint NOT NULL DEFAULT \'0\',
`smallint_without_padding` smallint NOT NULL DEFAULT \'0\',
`integer_without_padding` int NOT NULL DEFAULT \'0\',
`smallint_with_big_padding` smallint NOT NULL DEFAULT \'0\',
`smallint_without_default` smallint DEFAULT NULL,
`int_without_unsigned` int DEFAULT NULL,
`int_unsigned` int unsigned DEFAULT NULL,
`bigint_default_nullable` bigint unsigned DEFAULT \'1\',
`bigint_not_default_not_nullable` bigint unsigned NOT NULL,
PRIMARY KEY (`tinyint_ref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3',
'auto_increment_test' => 'CREATE TABLE `auto_increment_test` (
`int_auto_increment_with_nullable` int unsigned NOT NULL AUTO_INCREMENT,
`int_disabled_auto_increment` smallint unsigned DEFAULT \'0\',
UNIQUE KEY `AUTO_INCREMENT_TEST_INT_AUTO_INCREMENT_WITH_NULLABLE` (`int_auto_increment_with_nullable`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3'
];
@@ -0,0 +1,36 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
return [
'test_table_one' => 'CREATE TABLE `test_table_one` (
`smallint` smallint(6) NOT NULL AUTO_INCREMENT,
`varchar` varchar(254) DEFAULT NULL,
PRIMARY KEY (`smallint`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8',
'test_table_two' => 'CREATE TABLE `test_table_two` (
`smallint` smallint(6) NOT NULL AUTO_INCREMENT,
`varchar` varchar(254) DEFAULT NULL,
PRIMARY KEY (`smallint`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8',
'reference_table' => 'CREATE TABLE `reference_table` (
`tinyint_ref` tinyint(4) NOT NULL AUTO_INCREMENT,
`tinyint_without_padding` tinyint(4) NOT NULL DEFAULT \'0\',
`bigint_without_padding` bigint(20) NOT NULL DEFAULT \'0\',
`smallint_without_padding` smallint(6) NOT NULL DEFAULT \'0\',
`integer_without_padding` int(11) NOT NULL DEFAULT \'0\',
`smallint_with_big_padding` smallint(6) NOT NULL DEFAULT \'0\',
`smallint_without_default` smallint(6) DEFAULT NULL,
`int_without_unsigned` int(11) DEFAULT NULL,
`int_unsigned` int(10) unsigned DEFAULT NULL,
`bigint_default_nullable` bigint(20) unsigned DEFAULT \'1\',
`bigint_not_default_not_nullable` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`tinyint_ref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8',
'auto_increment_test' => 'CREATE TABLE `auto_increment_test` (
`int_auto_increment_with_nullable` int(10) unsigned NOT NULL AUTO_INCREMENT,
`int_disabled_auto_increment` smallint(5) unsigned DEFAULT \'0\',
UNIQUE KEY `AUTO_INCREMENT_TEST_INT_AUTO_INCREMENT_WITH_NULLABLE` (`int_auto_increment_with_nullable`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8'
];
@@ -0,0 +1,12 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
use Magento\Framework\Component\ComponentRegistrar;
$registrar = new ComponentRegistrar();
if ($registrar->getPath(ComponentRegistrar::MODULE, 'Magento_TestSetupDeclarationModule2') === null) {
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_TestSetupDeclarationModule2', __DIR__);
}