brand seeder
语言包完善 create categories countries seeder currencies seeder customer group seeder add language and seeder PagesSeeder product seeder PluginsSeeder seeder setting seeder 修复产品图片和多规格 fixed setting
This commit is contained in:
parent
822ab3d6d3
commit
62eb321079
|
|
@ -23,7 +23,7 @@ return [
|
|||
*
|
||||
*/
|
||||
'welcome' => [
|
||||
'templateTitle' => 'Welcome',
|
||||
'template_title' => 'Welcome',
|
||||
'title' => 'Welcome',
|
||||
'describe' => 'Welcome to install BeikeShop. Easy Installation and Setup Wizard.',
|
||||
'message' => 'Easy Installation and Setup Wizard.',
|
||||
|
|
@ -36,7 +36,7 @@ return [
|
|||
*
|
||||
*/
|
||||
'requirements' => [
|
||||
'templateTitle' => 'Step 1 | Server Requirements',
|
||||
'template_title' => 'Step 1 | Server Requirements',
|
||||
'environment' => 'Environmen',
|
||||
'title' => 'Server Requirements',
|
||||
'next' => 'Check Permissions',
|
||||
|
|
@ -48,7 +48,7 @@ return [
|
|||
*
|
||||
*/
|
||||
'permissions' => [
|
||||
'templateTitle' => 'Step 2 | Directory Permission',
|
||||
'template_title' => 'Step 2 | Directory Permission',
|
||||
'title' => 'Directory permission detection',
|
||||
'next' => 'Configure Environment',
|
||||
'table' => 'Table of contents',
|
||||
|
|
@ -61,7 +61,7 @@ return [
|
|||
*
|
||||
*/
|
||||
'environment' => [
|
||||
'templateTitle' => 'Step 3 | System Parameters',
|
||||
'template_title' => 'Step 3 | System Parameters',
|
||||
'title' => 'System parameter configuration',
|
||||
'name_required' => 'An environment name is required.',
|
||||
'database_link' => 'Database link',
|
||||
|
|
@ -115,7 +115,7 @@ return [
|
|||
*/
|
||||
'final' => [
|
||||
'title' => 'Installation Finished',
|
||||
'templateTitle' => 'Installation Finished',
|
||||
'template_title' => 'Installation Finished',
|
||||
'migration' => 'Migration & Seed Console Output:',
|
||||
'console' => 'Application Console Output:',
|
||||
'log' => 'Installation Log Entry:',
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ return [
|
|||
*
|
||||
*/
|
||||
'welcome' => [
|
||||
'templateTitle' => '欢迎',
|
||||
'template_title' => '欢迎',
|
||||
'title' => '欢迎来到安装引导程序',
|
||||
'describe' => '欢迎使用安装引导,在后面的步骤中我们将检测您的系统环境和安装条件是否达标,请根据每一步中的提示信息操作,谢谢。',
|
||||
'message' => '欢迎来到安装向导.',
|
||||
|
|
@ -32,7 +32,7 @@ return [
|
|||
*
|
||||
*/
|
||||
'requirements' => [
|
||||
'templateTitle' => '第一步 | 服务器环境',
|
||||
'template_title' => '第一步 | 服务器环境',
|
||||
'title' => '系统环境要求检测',
|
||||
'environment' => '环境',
|
||||
],
|
||||
|
|
@ -43,7 +43,7 @@ return [
|
|||
*
|
||||
*/
|
||||
'permissions' => [
|
||||
'templateTitle' => '第二步 | 目录权限',
|
||||
'template_title' => '第二步 | 目录权限',
|
||||
'title' => '目录权限检测',
|
||||
'table' => '目录',
|
||||
'next' => '配置环境参数',
|
||||
|
|
@ -56,7 +56,7 @@ return [
|
|||
*
|
||||
*/
|
||||
'environment' => [
|
||||
'templateTitle' => '第三步 | 系统参数',
|
||||
'template_title' => '第三步 | 系统参数',
|
||||
'title' => '系统参数配置',
|
||||
'app_url_label' => '您的应用URL',
|
||||
'database_link' => '数据库链接',
|
||||
|
|
@ -89,7 +89,7 @@ return [
|
|||
*
|
||||
*/
|
||||
'final' => [
|
||||
'templateTitle' => '安装完成',
|
||||
'template_title' => '安装完成',
|
||||
'title' => '获取安装结果',
|
||||
'finished' => '恭喜您,系统安装成功,赶快体验吧',
|
||||
'to_front' => '访问前台',
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
@extends('installer::layouts.master')
|
||||
|
||||
@section('template_title')
|
||||
{{ trans('installer::installer_messages.environment.wizard.templateTitle') }}
|
||||
{{ trans('installer::installer_messages.environment.template_title') }}
|
||||
@endsection
|
||||
|
||||
@section('title')
|
||||
<i class="fa fa-magic fa-fw" aria-hidden="true"></i>
|
||||
{!! trans('installer::installer_messages.environment.wizard.title') !!}
|
||||
{!! trans('installer::installer_messages.environment.title') !!}
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('installer::layouts.master')
|
||||
|
||||
@section('template_title')
|
||||
{{ trans('installer::installer_messages.final.templateTitle') }}
|
||||
{{ trans('installer::installer_messages.final.template_title') }}
|
||||
@endsection
|
||||
|
||||
@section('title')
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('installer::layouts.master')
|
||||
|
||||
@section('template_title')
|
||||
{{ trans('installer::installer_messages.permissions.templateTitle') }}
|
||||
{{ trans('installer::installer_messages.permissions.template_title') }}
|
||||
@endsection
|
||||
|
||||
@section('title')
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('installer::layouts.master')
|
||||
|
||||
@section('template_title')
|
||||
{{ trans('installer::installer_messages.requirements.templateTitle') }}
|
||||
{{ trans('installer::installer_messages.requirements.template_title') }}
|
||||
@endsection
|
||||
|
||||
@section('title')
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@extends('installer::layouts.master')
|
||||
|
||||
@section('template_title')
|
||||
{{ trans('installer::installer_messages.welcome.templateTitle') }}
|
||||
{{ trans('installer::installer_messages.welcome.template_title') }}
|
||||
@endsection
|
||||
|
||||
@section('title')
|
||||
|
|
|
|||
|
|
@ -0,0 +1,139 @@
|
|||
<?php
|
||||
/**
|
||||
* BrandsSeeder.php
|
||||
*
|
||||
* @copyright 2022 opencart.cn - All Rights Reserved
|
||||
* @link http://www.guangdawangluo.com
|
||||
* @author Edward Yang <yangjin@opencart.cn>
|
||||
* @created 2022-09-05 19:42:42
|
||||
* @modified 2022-09-05 19:42:42
|
||||
*/
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Beike\Models\Brand;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class BrandsSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$items = $this->getItems();
|
||||
|
||||
if ($items) {
|
||||
Brand::query()->truncate();
|
||||
foreach ($items as $item) {
|
||||
Brand::query()->create($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function getItems()
|
||||
{
|
||||
return [
|
||||
[
|
||||
"id" => 1,
|
||||
"name" => "New Balance",
|
||||
"first" => "B",
|
||||
"logo" => "catalog/demo/brands/1.png",
|
||||
"sort_order" => 1,
|
||||
"status" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 2,
|
||||
"name" => "BROOKS",
|
||||
"first" => "B",
|
||||
"logo" => "catalog/demo/brands/10.png",
|
||||
"sort_order" => 2,
|
||||
"status" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 3,
|
||||
"name" => "Columbia",
|
||||
"first" => "C",
|
||||
"logo" => "catalog/demo/brands/11.png",
|
||||
"sort_order" => 3,
|
||||
"status" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 4,
|
||||
"name" => "RayBan",
|
||||
"first" => "R",
|
||||
"logo" => "catalog/demo/brands/12.png",
|
||||
"sort_order" => 4,
|
||||
"status" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 5,
|
||||
"name" => "PUMA",
|
||||
"first" => "P",
|
||||
"logo" => "catalog/demo/brands/2.png",
|
||||
"sort_order" => 5,
|
||||
"status" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 6,
|
||||
"name" => "HERMES",
|
||||
"first" => "H",
|
||||
"logo" => "catalog/demo/brands/3.png",
|
||||
"sort_order" => 6,
|
||||
"status" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 7,
|
||||
"name" => "Dior",
|
||||
"first" => "D",
|
||||
"logo" => "catalog/demo/brands/4.png",
|
||||
"sort_order" => 7,
|
||||
"status" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 8,
|
||||
"name" => "NIKE",
|
||||
"first" => "N",
|
||||
"logo" => "catalog/demo/brands/5.png",
|
||||
"sort_order" => 8,
|
||||
"status" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 9,
|
||||
"name" => "FILA",
|
||||
"first" => "F",
|
||||
"logo" => "catalog/demo/brands/7.png",
|
||||
"sort_order" => 9,
|
||||
"status" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 10,
|
||||
"name" => "Adidas",
|
||||
"first" => "A",
|
||||
"logo" => "catalog/demo/brands/9.png",
|
||||
"sort_order" => 10,
|
||||
"status" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 11,
|
||||
"name" => "American Eagle",
|
||||
"first" => "A",
|
||||
"logo" => "catalog/demo/brands/8.png",
|
||||
"sort_order" => 11,
|
||||
"status" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 12,
|
||||
"name" => "Tommy Hilfiger",
|
||||
"first" => "T",
|
||||
"logo" => "catalog/demo/brands/6.png",
|
||||
"sort_order" => 12,
|
||||
"status" => 1,
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,867 @@
|
|||
<?php
|
||||
/**
|
||||
* CategoriesSeeder.php
|
||||
*
|
||||
* @copyright 2022 opencart.cn - All Rights Reserved
|
||||
* @link http://www.guangdawangluo.com
|
||||
* @author Edward Yang <yangjin@opencart.cn>
|
||||
* @created 2022-09-05 19:42:42
|
||||
* @modified 2022-09-05 19:42:42
|
||||
*/
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Beike\Models\Brand;
|
||||
use Beike\Models\Category;
|
||||
use Beike\Models\CategoryDescription;
|
||||
use Beike\Models\CategoryPath;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CategoriesSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$categories = $this->getCategories();
|
||||
|
||||
if ($categories) {
|
||||
Category::query()->truncate();
|
||||
foreach ($categories as $item) {
|
||||
Category::query()->create($item);
|
||||
}
|
||||
}
|
||||
|
||||
$descriptions = $this->getCategoryDescriptions();
|
||||
if ($descriptions) {
|
||||
CategoryDescription::query()->truncate();
|
||||
foreach ($descriptions as $item) {
|
||||
CategoryDescription::query()->create($item);
|
||||
}
|
||||
}
|
||||
|
||||
$paths = $this->getCategoryPaths();
|
||||
if ($paths) {
|
||||
CategoryPath::query()->truncate();
|
||||
foreach ($paths as $item) {
|
||||
CategoryPath::query()->create($item);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function getCategories()
|
||||
{
|
||||
return [
|
||||
[
|
||||
"id" => 100000,
|
||||
"parent_id" => 0,
|
||||
"position" => 2,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100001,
|
||||
"parent_id" => 100000,
|
||||
"position" => 0,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100002,
|
||||
"parent_id" => 100001,
|
||||
"position" => 0,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100003,
|
||||
"parent_id" => 0,
|
||||
"position" => 1,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100004,
|
||||
"parent_id" => 100008,
|
||||
"position" => 0,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100005,
|
||||
"parent_id" => 100004,
|
||||
"position" => 0,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100006,
|
||||
"parent_id" => 100005,
|
||||
"position" => 0,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100007,
|
||||
"parent_id" => 0,
|
||||
"position" => 0,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100008,
|
||||
"parent_id" => 0,
|
||||
"position" => 9,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100009,
|
||||
"parent_id" => 100007,
|
||||
"position" => 0,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100010,
|
||||
"parent_id" => 0,
|
||||
"position" => 0,
|
||||
"active" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 100011,
|
||||
"parent_id" => 0,
|
||||
"position" => 0,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100012,
|
||||
"parent_id" => 100011,
|
||||
"position" => 0,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100013,
|
||||
"parent_id" => 0,
|
||||
"position" => 0,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100014,
|
||||
"parent_id" => 100012,
|
||||
"position" => 0,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100015,
|
||||
"parent_id" => 100014,
|
||||
"position" => 0,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100018,
|
||||
"parent_id" => 100012,
|
||||
"position" => 0,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100019,
|
||||
"parent_id" => 100014,
|
||||
"position" => 0,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100020,
|
||||
"parent_id" => 100018,
|
||||
"position" => 0,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100031,
|
||||
"parent_id" => 100000,
|
||||
"position" => 0,
|
||||
"active" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 100035,
|
||||
"parent_id" => 100011,
|
||||
"position" => 0,
|
||||
"active" => 1,
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
public function getCategoryDescriptions()
|
||||
{
|
||||
return [
|
||||
[
|
||||
"id" => 11,
|
||||
"category_id" => 100005,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "2-1-1",
|
||||
"content" => "",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 12,
|
||||
"category_id" => 100005,
|
||||
"locale" => "en",
|
||||
"name" => "2-1-1",
|
||||
"content" => "",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 13,
|
||||
"category_id" => 100006,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "特价购买",
|
||||
"content" => "",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 16,
|
||||
"category_id" => 100002,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "平板耳机",
|
||||
"content" => "",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 17,
|
||||
"category_id" => 100002,
|
||||
"locale" => "en",
|
||||
"name" => "平板耳机",
|
||||
"content" => "",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 32,
|
||||
"category_id" => 100010,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "日用品",
|
||||
"content" => "",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 33,
|
||||
"category_id" => 100010,
|
||||
"locale" => "en",
|
||||
"name" => "English日用品",
|
||||
"content" => "",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 54,
|
||||
"category_id" => 100015,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "化妆品3",
|
||||
"content" => "化妆品3",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 55,
|
||||
"category_id" => 100015,
|
||||
"locale" => "en",
|
||||
"name" => "化妆品3",
|
||||
"content" => "化妆品3",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 60,
|
||||
"category_id" => 100013,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "夏季促销",
|
||||
"content" => "夏季促销",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 61,
|
||||
"category_id" => 100013,
|
||||
"locale" => "en",
|
||||
"name" => "Summer promotion",
|
||||
"content" => "Summer promotion",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 72,
|
||||
"category_id" => 100012,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "男装",
|
||||
"content" => "男装",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 73,
|
||||
"category_id" => 100012,
|
||||
"locale" => "en",
|
||||
"name" => "cotta",
|
||||
"content" => "cotta",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 78,
|
||||
"category_id" => 100014,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "上装",
|
||||
"content" => "化妆品2",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 79,
|
||||
"category_id" => 100014,
|
||||
"locale" => "en",
|
||||
"name" => "make up",
|
||||
"content" => "化妆品2",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 82,
|
||||
"category_id" => 100018,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "下装",
|
||||
"content" => "",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 83,
|
||||
"category_id" => 100018,
|
||||
"locale" => "en",
|
||||
"name" => "makeup and costume",
|
||||
"content" => "",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 84,
|
||||
"category_id" => 100019,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "棉衣",
|
||||
"content" => "",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 85,
|
||||
"category_id" => 100019,
|
||||
"locale" => "en",
|
||||
"name" => "cotton-padded clothes",
|
||||
"content" => "",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 86,
|
||||
"category_id" => 100020,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "棉毛裤",
|
||||
"content" => "",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 87,
|
||||
"category_id" => 100020,
|
||||
"locale" => "en",
|
||||
"name" => "cotton interlock trousers",
|
||||
"content" => "",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 120,
|
||||
"category_id" => 100011,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "男装|女装",
|
||||
"content" => "男装|女装",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 121,
|
||||
"category_id" => 100011,
|
||||
"locale" => "en",
|
||||
"name" => "Fashion men's wear1",
|
||||
"content" => "Fashion men's wear",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 130,
|
||||
"category_id" => 100035,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "智能冰箱",
|
||||
"content" => "智能冰箱",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 131,
|
||||
"category_id" => 100035,
|
||||
"locale" => "en",
|
||||
"name" => "智能冰箱",
|
||||
"content" => "智能冰箱",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 150,
|
||||
"category_id" => 100007,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "运动户外",
|
||||
"content" => "运动户外",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 151,
|
||||
"category_id" => 100007,
|
||||
"locale" => "en",
|
||||
"name" => "Sports",
|
||||
"content" => "Sports",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 152,
|
||||
"category_id" => 100008,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "电子数码",
|
||||
"content" => "电子数码",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 153,
|
||||
"category_id" => 100008,
|
||||
"locale" => "en",
|
||||
"name" => "Electron",
|
||||
"content" => "Electron",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 154,
|
||||
"category_id" => 100009,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "帐篷",
|
||||
"content" => "帐篷",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 155,
|
||||
"category_id" => 100009,
|
||||
"locale" => "en",
|
||||
"name" => "Tent",
|
||||
"content" => "Tent",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 156,
|
||||
"category_id" => 100004,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "相机",
|
||||
"content" => "相机",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 157,
|
||||
"category_id" => 100004,
|
||||
"locale" => "en",
|
||||
"name" => "Camera",
|
||||
"content" => "Camera",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 158,
|
||||
"category_id" => 100000,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "夏季新品",
|
||||
"content" => "夏季新品",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 159,
|
||||
"category_id" => 100000,
|
||||
"locale" => "en",
|
||||
"name" => "Summer",
|
||||
"content" => "Summer",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 160,
|
||||
"category_id" => 100003,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "时尚潮流",
|
||||
"content" => "时尚潮流",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 161,
|
||||
"category_id" => 100003,
|
||||
"locale" => "en",
|
||||
"name" => "Fashion",
|
||||
"content" => "Fashion",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 162,
|
||||
"category_id" => 100036,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "冬季套装",
|
||||
"content" => "",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
],
|
||||
[
|
||||
"id" => 163,
|
||||
"category_id" => 100036,
|
||||
"locale" => "en",
|
||||
"name" => "winter",
|
||||
"content" => "",
|
||||
"meta_title" => "",
|
||||
"meta_description" => "",
|
||||
"meta_keyword" => "",
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public function getCategoryPaths()
|
||||
{
|
||||
return [
|
||||
[
|
||||
"id" => 38,
|
||||
"category_id" => 100010,
|
||||
"path_id" => 100010,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 72,
|
||||
"category_id" => 100013,
|
||||
"path_id" => 100013,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 181,
|
||||
"category_id" => 100011,
|
||||
"path_id" => 100011,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 182,
|
||||
"category_id" => 100012,
|
||||
"path_id" => 100011,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 183,
|
||||
"category_id" => 100012,
|
||||
"path_id" => 100012,
|
||||
"level" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 184,
|
||||
"category_id" => 100014,
|
||||
"path_id" => 100011,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 185,
|
||||
"category_id" => 100014,
|
||||
"path_id" => 100012,
|
||||
"level" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 186,
|
||||
"category_id" => 100014,
|
||||
"path_id" => 100014,
|
||||
"level" => 2,
|
||||
],
|
||||
[
|
||||
"id" => 187,
|
||||
"category_id" => 100015,
|
||||
"path_id" => 100011,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 188,
|
||||
"category_id" => 100015,
|
||||
"path_id" => 100012,
|
||||
"level" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 189,
|
||||
"category_id" => 100015,
|
||||
"path_id" => 100014,
|
||||
"level" => 2,
|
||||
],
|
||||
[
|
||||
"id" => 190,
|
||||
"category_id" => 100015,
|
||||
"path_id" => 100015,
|
||||
"level" => 3,
|
||||
],
|
||||
[
|
||||
"id" => 191,
|
||||
"category_id" => 100018,
|
||||
"path_id" => 100011,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 192,
|
||||
"category_id" => 100018,
|
||||
"path_id" => 100012,
|
||||
"level" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 193,
|
||||
"category_id" => 100018,
|
||||
"path_id" => 100018,
|
||||
"level" => 2,
|
||||
],
|
||||
[
|
||||
"id" => 194,
|
||||
"category_id" => 100019,
|
||||
"path_id" => 100011,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 195,
|
||||
"category_id" => 100019,
|
||||
"path_id" => 100012,
|
||||
"level" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 196,
|
||||
"category_id" => 100019,
|
||||
"path_id" => 100014,
|
||||
"level" => 2,
|
||||
],
|
||||
[
|
||||
"id" => 197,
|
||||
"category_id" => 100019,
|
||||
"path_id" => 100019,
|
||||
"level" => 3,
|
||||
],
|
||||
[
|
||||
"id" => 198,
|
||||
"category_id" => 100020,
|
||||
"path_id" => 100011,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 199,
|
||||
"category_id" => 100020,
|
||||
"path_id" => 100012,
|
||||
"level" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 200,
|
||||
"category_id" => 100020,
|
||||
"path_id" => 100018,
|
||||
"level" => 2,
|
||||
],
|
||||
[
|
||||
"id" => 201,
|
||||
"category_id" => 100020,
|
||||
"path_id" => 100020,
|
||||
"level" => 3,
|
||||
],
|
||||
[
|
||||
"id" => 206,
|
||||
"category_id" => 100035,
|
||||
"path_id" => 100011,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 207,
|
||||
"category_id" => 100035,
|
||||
"path_id" => 100035,
|
||||
"level" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 264,
|
||||
"category_id" => 100007,
|
||||
"path_id" => 100007,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 267,
|
||||
"category_id" => 100008,
|
||||
"path_id" => 100008,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 268,
|
||||
"category_id" => 100009,
|
||||
"path_id" => 100007,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 269,
|
||||
"category_id" => 100009,
|
||||
"path_id" => 100009,
|
||||
"level" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 270,
|
||||
"category_id" => 100004,
|
||||
"path_id" => 100008,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 271,
|
||||
"category_id" => 100004,
|
||||
"path_id" => 100004,
|
||||
"level" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 272,
|
||||
"category_id" => 100005,
|
||||
"path_id" => 100008,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 273,
|
||||
"category_id" => 100005,
|
||||
"path_id" => 100004,
|
||||
"level" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 274,
|
||||
"category_id" => 100005,
|
||||
"path_id" => 100005,
|
||||
"level" => 2,
|
||||
],
|
||||
[
|
||||
"id" => 275,
|
||||
"category_id" => 100000,
|
||||
"path_id" => 100000,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 276,
|
||||
"category_id" => 100000,
|
||||
"path_id" => 100000,
|
||||
"level" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 277,
|
||||
"category_id" => 100002,
|
||||
"path_id" => 100000,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 278,
|
||||
"category_id" => 100002,
|
||||
"path_id" => 100000,
|
||||
"level" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 279,
|
||||
"category_id" => 100002,
|
||||
"path_id" => 100001,
|
||||
"level" => 2,
|
||||
],
|
||||
[
|
||||
"id" => 280,
|
||||
"category_id" => 100002,
|
||||
"path_id" => 100002,
|
||||
"level" => 3,
|
||||
],
|
||||
[
|
||||
"id" => 281,
|
||||
"category_id" => 100003,
|
||||
"path_id" => 100000,
|
||||
"level" => 0,
|
||||
],
|
||||
[
|
||||
"id" => 282,
|
||||
"category_id" => 100003,
|
||||
"path_id" => 100000,
|
||||
"level" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 283,
|
||||
"category_id" => 100003,
|
||||
"path_id" => 100001,
|
||||
"level" => 2,
|
||||
],
|
||||
[
|
||||
"id" => 284,
|
||||
"category_id" => 100003,
|
||||
"path_id" => 100002,
|
||||
"level" => 3,
|
||||
],
|
||||
[
|
||||
"id" => 285,
|
||||
"category_id" => 100003,
|
||||
"path_id" => 100003,
|
||||
"level" => 4,
|
||||
],
|
||||
[
|
||||
"id" => 286,
|
||||
"category_id" => 100036,
|
||||
"path_id" => 100036,
|
||||
"level" => 0,
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
/**
|
||||
* CurrenciesSeeder.php
|
||||
*
|
||||
* @copyright 2022 opencart.cn - All Rights Reserved
|
||||
* @link http://www.guangdawangluo.com
|
||||
* @author Edward Yang <yangjin@opencart.cn>
|
||||
* @created 2022-09-05 19:42:42
|
||||
* @modified 2022-09-05 19:42:42
|
||||
*/
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Beike\Models\Brand;
|
||||
use Beike\Models\Currency;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CurrenciesSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$items = $this->getItems();
|
||||
|
||||
if ($items) {
|
||||
Currency::query()->truncate();
|
||||
foreach ($items as $item) {
|
||||
Currency::query()->create($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function getItems()
|
||||
{
|
||||
return [
|
||||
[
|
||||
"id" => 1,
|
||||
"name" => "人民币",
|
||||
"code" => "CNY",
|
||||
"symbol_left" => "¥",
|
||||
"symbol_right" => "",
|
||||
"decimal_place" => 2,
|
||||
"value" => 1,
|
||||
"status" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 2,
|
||||
"name" => "USD",
|
||||
"code" => "USD",
|
||||
"symbol_left" => "$",
|
||||
"symbol_right" => "",
|
||||
"decimal_place" => 2,
|
||||
"value" => 0.14449197,
|
||||
"status" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 3,
|
||||
"name" => "欧元",
|
||||
"code" => "EUR",
|
||||
"symbol_left" => "€",
|
||||
"symbol_right" => "",
|
||||
"decimal_place" => 2,
|
||||
"value" => 0.1453069,
|
||||
"status" => 1,
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
<?php
|
||||
/**
|
||||
* CustomerGroupsSeeder.php
|
||||
*
|
||||
* @copyright 2022 opencart.cn - All Rights Reserved
|
||||
* @link http://www.guangdawangluo.com
|
||||
* @author Edward Yang <yangjin@opencart.cn>
|
||||
* @created 2022-09-05 19:42:42
|
||||
* @modified 2022-09-05 19:42:42
|
||||
*/
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Beike\Models\Brand;
|
||||
use Beike\Models\Currency;
|
||||
use Beike\Models\CustomerGroup;
|
||||
use Beike\Models\CustomerGroupDescription;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CustomerGroupsSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$items = $this->getCustomerGroups();
|
||||
if ($items) {
|
||||
CustomerGroup::query()->truncate();
|
||||
foreach ($items as $item) {
|
||||
CustomerGroup::query()->create($item);
|
||||
}
|
||||
}
|
||||
|
||||
$items = $this->getCustomerGroupDescriptions();
|
||||
if ($items) {
|
||||
CustomerGroupDescription::query()->truncate();
|
||||
foreach ($items as $item) {
|
||||
CustomerGroupDescription::query()->create($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function getCustomerGroups(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
"id" => 1,
|
||||
"total" => 100,
|
||||
"reward_point_factor" => 2,
|
||||
"use_point_factor" => 2,
|
||||
"discount_factor" => 2,
|
||||
"level" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 2,
|
||||
"total" => 200,
|
||||
"reward_point_factor" => 2,
|
||||
"use_point_factor" => 2,
|
||||
"discount_factor" => 2,
|
||||
"level" => 2,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function getCustomerGroupDescriptions(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
"id" => 1,
|
||||
"customer_group_id" => 1,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "白银",
|
||||
"description" => "白银组",
|
||||
],
|
||||
[
|
||||
"id" => 2,
|
||||
"customer_group_id" => 1,
|
||||
"locale" => "en",
|
||||
"name" => "Silver",
|
||||
"description" => "Silver Group",
|
||||
],
|
||||
[
|
||||
"id" => 3,
|
||||
"customer_group_id" => 2,
|
||||
"locale" => "zh_cn",
|
||||
"name" => "黄金",
|
||||
"description" => "黄金组",
|
||||
],
|
||||
[
|
||||
"id" => 4,
|
||||
"customer_group_id" => 2,
|
||||
"locale" => "en",
|
||||
"name" => "Golden",
|
||||
"description" => "Golden Group",
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Beike\Models\CustomerGroup;
|
||||
use Beike\Models\Product;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
|
@ -16,12 +17,19 @@ class DatabaseSeeder extends Seeder
|
|||
*/
|
||||
public function run()
|
||||
{
|
||||
// Eloquent::unguard();
|
||||
|
||||
$installerPath = base_path('beike/Installer');
|
||||
$path = $installerPath . '/database.sql';
|
||||
DB::unprepared(file_get_contents($path));
|
||||
$this->command->info('Database seeded!');
|
||||
$this->call([
|
||||
BrandsSeeder::class,
|
||||
CategoriesSeeder::class,
|
||||
CountriesSeeder::class,
|
||||
CurrenciesSeeder::class,
|
||||
CustomerGroupsSeeder::class,
|
||||
LanguagesSeeder::class,
|
||||
PagesSeeder::class,
|
||||
PluginsSeeder::class,
|
||||
ZonesSeeder::class,
|
||||
ProductsSeeder::class,
|
||||
SettingsSeeder::class,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
/**
|
||||
* LanguagesSeeder.php
|
||||
*
|
||||
* @copyright 2022 opencart.cn - All Rights Reserved
|
||||
* @link http://www.guangdawangluo.com
|
||||
* @author Edward Yang <yangjin@opencart.cn>
|
||||
* @created 2022-09-05 19:42:42
|
||||
* @modified 2022-09-05 19:42:42
|
||||
*/
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Beike\Models\Brand;
|
||||
use Beike\Models\Currency;
|
||||
use Beike\Models\Language;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class LanguagesSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$items = $this->getItems();
|
||||
|
||||
if ($items) {
|
||||
Language::query()->truncate();
|
||||
foreach ($items as $item) {
|
||||
Language::query()->create($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function getItems()
|
||||
{
|
||||
return [
|
||||
[
|
||||
"id" => 1,
|
||||
"name" => "中文",
|
||||
"code" => "zh_cn",
|
||||
"locale" => "",
|
||||
"image" => "catalog/favicon.png",
|
||||
"sort_order" => 1,
|
||||
"status" => 1,
|
||||
],
|
||||
[
|
||||
"id" => 2,
|
||||
"name" => "English",
|
||||
"code" => "en",
|
||||
"locale" => "",
|
||||
"image" => "catalog/demo/services-icon/3.png",
|
||||
"sort_order" => 1,
|
||||
"status" => 1,
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,77 @@
|
|||
<?php
|
||||
/**
|
||||
* PluginsSeeder.php
|
||||
*
|
||||
* @copyright 2022 opencart.cn - All Rights Reserved
|
||||
* @link http://www.guangdawangluo.com
|
||||
* @author TL <mengwb@opencart.cn>
|
||||
* @created 2022-09-05 20:42:42
|
||||
* @modified 2022-09-05 20:42:42
|
||||
*/
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Beike\Models\Plugin;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class PluginsSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$pages = $this->getPlugins();
|
||||
|
||||
if ($pages) {
|
||||
Plugin::query()->truncate();
|
||||
foreach ($pages as $item) {
|
||||
Plugin::query()->create($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function getPlugins()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'id' => '39',
|
||||
'type' => 'payment',
|
||||
'code' => 'bk_stripe',
|
||||
],
|
||||
[
|
||||
'id' => '42',
|
||||
'type' => 'view',
|
||||
'code' => 'header_menu',
|
||||
],
|
||||
[
|
||||
'id' => '44',
|
||||
'type' => 'total',
|
||||
'code' => 'service_charge',
|
||||
],
|
||||
[
|
||||
'id' => '52',
|
||||
'type' => 'view',
|
||||
'code' => 'latest_products',
|
||||
],
|
||||
[
|
||||
'id' => '55',
|
||||
'type' => 'shipping',
|
||||
'code' => 'flat_shipping',
|
||||
],
|
||||
[
|
||||
'id' => '56',
|
||||
'type' => 'payment',
|
||||
'code' => 'paypal',
|
||||
],
|
||||
[
|
||||
'id' => '57',
|
||||
'type' => 'payment',
|
||||
'code' => 'stripe',
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue