moshaorui hace 5 meses
padre
commit
136dfe09fa

+ 74 - 0
app/Admin/Controllers/BaseProductCategoryController.php

@@ -0,0 +1,74 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Admin\Repositories\BaseProductCategory;
+use Dcat\Admin\Form;
+use Dcat\Admin\Grid;
+use Dcat\Admin\Http\Controllers\AdminController;
+use Dcat\Admin\Layout\Content;
+use App\Admin\Repositories\BaseProductParameter;
+
+class BaseProductCategoryController extends AdminController
+{
+
+    public function index(Content $content)
+    {
+        return $content
+            ->header('Product Category')
+            ->description('')
+            ->body($this->grid());
+    }
+
+
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        return Grid::make(BaseProductCategory::with('baseProductParameter'), function (Grid $grid) {
+            $grid->column('id','ID')->bold()->sortable();
+            $grid->column('name')->tree(true,true);
+            $grid->column('parent_id');
+            $grid->column('baseProductParameter.name','Parameter Name');
+            $grid->column('order')->orderable();
+            $grid->column('enabled')->switch();
+            $grid->column('created_at');
+            $grid->column('updated_at')->sortable();
+            $grid->filter(function (Grid\Filter $filter) {
+                $filter->like('name');
+            });
+            $grid->disableViewButton();
+            $grid->showQuickEditButton();
+            $grid->enableDialogCreate();
+            $grid->disableEditButton();
+            $grid->quickSearch('name');
+        });
+
+    }
+
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        return Form::make(new BaseProductCategory(), function (Form $form) {
+            $form->display('id', 'ID');
+            $form->select('parent_id', trans('Parent'))
+                ->options(BaseProductCategory::selectOptions())
+                ->saving(function ($v) {
+                    return (int) $v;
+                });
+            $form->text('name')->required();
+            $form->select('parameter_id', 'parameter')->options(BaseProductParameter::selectOptions())->required();
+            $form->switch('enabled')->default(1);
+          //  $form->display('created_at');
+          //  $form->display('updated_at');
+        });
+    }
+}

+ 104 - 0
app/Admin/Controllers/BaseProductController.php

@@ -0,0 +1,104 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Admin\Repositories\BaseProduct;
+use Dcat\Admin\Form;
+use Dcat\Admin\Grid;
+use Dcat\Admin\Show;
+use Dcat\Admin\Http\Controllers\AdminController;
+use App\Models\BaseProductCategory;
+class BaseProductController extends AdminController
+{
+
+
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        return Grid::make(BaseProduct::with('baseProductCategory'), function (Grid $grid) {
+            $grid->column('id','ID')->sortable();
+            $grid->column('title');
+            $grid->column('sku');
+            $grid->column('baseProductCategory.name','Category Name');
+            $grid->column('publish_date');
+            $grid->column('order')->orderable();
+            $grid->column('enabled')->switch();
+            $grid->column('created_at');
+            $grid->column('updated_at')->sortable();
+            // 筛选
+            $grid->filter(function (Grid\Filter $filter) {
+                $filter->equal('sku');
+                $filter->like('title');
+                $filter->equal('category_id','Category')->select(BaseProductCategory::selectOptions());
+            });
+            //排序
+           $grid->model()->orderBy("order",'asc')->orderBy('id', 'desc');
+            // 禁用查看按钮
+            $grid->disableViewButton();
+            $grid->showQuickEditButton();
+            $grid->enableDialogCreate();
+            $grid->disableEditButton();
+        });
+    }
+
+
+
+    /**
+     * Make a show builder.
+     *
+     * @param mixed $id
+     *
+     * @return Show
+     */
+    protected function detail($id)
+    {
+        return Show::make($id, new BaseProduct(), function (Show $show) {
+            $show->field('id');
+            $show->field('title');
+            $show->field('keywords');
+            $show->field('description');
+            $show->field('sku');
+            $show->field('baseProductCategory.name','Category Name');
+            $show->field('publish_date');
+            $show->field('order');
+            $show->field('enabled');
+            $show->field('content');
+            $show->field('parameters');
+            $show->field('created_at');
+            $show->field('updated_at');
+        });
+    }
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+        return Form::make(new BaseProduct(), function (Form $form) {
+            $form->display('id');
+            $form->text('title');
+            $form->text('keywords');
+            $form->text('description');
+            $form->text('sku');
+
+            $form->select('category_id', 'Category Name')
+                ->options(BaseProductCategory::all()->pluck('name', 'id'))
+                ->required();
+
+            $form->text('publish_date');
+            $form->text('order');
+            $form->text('enabled');
+            $form->text('content');
+            $form->text('parameters');
+
+            $form->display('created_at');
+            $form->display('updated_at');
+        });
+    }
+}

+ 73 - 0
app/Admin/Controllers/BaseProductParameterController.php

@@ -0,0 +1,73 @@
+<?php
+
+namespace App\Admin\Controllers;
+
+use App\Admin\Repositories\BaseProductParameter;
+use Dcat\Admin\Form;
+use Dcat\Admin\Grid;
+use Dcat\Admin\Layout\Content;
+use Dcat\Admin\Show;
+use Dcat\Admin\Http\Controllers\AdminController;
+use Dcat\Admin\Form\NestedForm;
+
+class BaseProductParameterController extends AdminController
+{
+    public function index(Content $content)
+    {
+        return $content
+            ->header('Product Parameter')
+            ->description('')
+            ->body($this->grid());
+    }
+
+
+    /**
+     * Make a grid builder.
+     *
+     * @return Grid
+     */
+    protected function grid()
+    {
+        return Grid::make(new BaseProductParameter(), function (Grid $grid) {
+            $grid->column('id','ID')->sortable();
+            $grid->column('name');
+            $grid->column('order')->orderable();
+            $grid->column('enabled')->switch();
+            $grid->column('created_at');
+            $grid->column('updated_at')->sortable();
+            $grid->filter(function (Grid\Filter $filter) {
+                $filter->equal('id');
+            });
+            $grid->disableViewButton();
+            $grid->showQuickEditButton();
+            $grid->enableDialogCreate();
+            $grid->disableEditButton();
+            $grid->quickSearch('name');
+        });
+    }
+
+
+
+
+
+    /**
+     * Make a form builder.
+     *
+     * @return Form
+     */
+    protected function form()
+    {
+
+        return Form::make(new BaseProductParameter(), function (Form $form) {
+            $form->display('id');
+            $form->switch('enabled')->default(1);
+            $form->text('name')->required();
+            $form->table('content','Parameters', function (NestedForm $table) {
+                $table->text('key')->required();
+                $table->text('value')->required();
+            })->default([
+                ['key' => 'color', 'value' => 'white'],
+            ]);
+        });
+    }
+}

+ 16 - 0
app/Admin/Repositories/BaseProduct.php

@@ -0,0 +1,16 @@
+<?php
+
+namespace App\Admin\Repositories;
+
+use App\Models\BaseProduct as Model;
+use Dcat\Admin\Repositories\EloquentRepository;
+
+class BaseProduct extends EloquentRepository
+{
+    /**
+     * Model.
+     *
+     * @var string
+     */
+    protected $eloquentClass = Model::class;
+}

+ 29 - 0
app/Admin/Repositories/BaseProductCategory.php

@@ -0,0 +1,29 @@
+<?php
+
+namespace App\Admin\Repositories;
+
+use App\Models\BaseProductCategory as Model;
+use Dcat\Admin\Repositories\EloquentRepository;
+use Dcat\Admin\Traits\HasDateTimeFormatter;
+use Dcat\Admin\Traits\ModelTree;
+
+class BaseProductCategory extends EloquentRepository
+{
+
+    /**
+     * Model.
+     *
+     * @var string
+     */
+    protected $eloquentClass = Model::class;
+
+
+    // 调用模型方法
+    public static function selectOptions(\Closure $closure = null)
+    {
+       $selectOptions =  Model::class::selectOptions($closure);
+        return $selectOptions;
+    }
+
+
+}

+ 25 - 0
app/Admin/Repositories/BaseProductParameter.php

@@ -0,0 +1,25 @@
+<?php
+
+namespace App\Admin\Repositories;
+
+use App\Models\BaseProductParameter as Model;
+use Dcat\Admin\Repositories\EloquentRepository;
+
+class BaseProductParameter extends EloquentRepository
+{
+    /**
+     * Model.
+     *
+     * @var string
+     */
+    protected $eloquentClass = Model::class;
+
+    /*
+     * Select options for filter
+     */
+    public static function selectOptions() {
+        return Model::query()->where('enabled','=','1')->get()->pluck('name', 'id');
+    }
+
+
+}

+ 4 - 2
app/Admin/routes.php

@@ -11,7 +11,9 @@ Route::group([
     'namespace'  => config('admin.route.namespace'),
     'middleware' => config('admin.route.middleware'),
 ], function (Router $router) {
-
     $router->get('/', 'HomeController@index');
-
+    $router->resource('test', 'TestController');
+    $router->resource('base-product', 'BaseProductController');
+    $router->resource('product-category', 'BaseProductCategoryController');
+    $router->resource('product-parameter', 'BaseProductParameterController');
 });

+ 19 - 0
app/Models/BaseProduct.php

@@ -0,0 +1,19 @@
+<?php
+
+namespace App\Models;
+
+use Dcat\Admin\Traits\HasDateTimeFormatter;
+
+use Illuminate\Database\Eloquent\Model;
+
+class BaseProduct extends Model
+{
+	use HasDateTimeFormatter;
+    protected $table = 'base_product';
+
+    public function baseProductCategory()
+    {
+        return $this->hasOne(BaseProductCategory::class,'id','category_id');
+    }
+
+}

+ 46 - 0
app/Models/BaseProductCategory.php

@@ -0,0 +1,46 @@
+<?php
+
+namespace App\Models;
+
+use Dcat\Admin\Traits\HasDateTimeFormatter;
+
+use Dcat\Admin\Traits\ModelTree;
+use Illuminate\Database\Eloquent\Model;
+use Spatie\EloquentSortable\Sortable;
+
+class BaseProductCategory extends Model implements Sortable
+{
+    use HasDateTimeFormatter,
+        ModelTree {
+        ModelTree::boot as treeBoot;
+    }
+
+    protected $casts = [
+        'created_at' => 'datetime:Y-m-d H:i:s',
+        'updated_at' => 'datetime:Y-m-d H:i:s',
+    ];
+
+    //名称
+    protected $titleColumn = 'name';
+    //排序
+    protected $orderColumn = 'order';
+    //父级
+    protected $parentColumn = 'parent_id';
+
+    protected $table = 'base_product_category';
+
+    /*
+     * 关联产品参数
+     */
+    public function baseProductParameter()
+    {
+        return $this->hasOne(BaseProductParameter::class,'id','parameter_id');
+    }
+
+
+    public static function selectOptions(\Closure $closure = null)
+    {
+        $options = (new static())->withQuery($closure)->buildSelectOptions();
+        return collect($options)->all();
+    }
+}

+ 32 - 0
app/Models/BaseProductParameter.php

@@ -0,0 +1,32 @@
+<?php
+
+namespace App\Models;
+
+use Dcat\Admin\Traits\HasDateTimeFormatter;
+
+use Dcat\Admin\Traits\ModelTree;
+use Illuminate\Database\Eloquent\Model;
+use Spatie\EloquentSortable\Sortable;
+use Spatie\EloquentSortable\SortableTrait;
+
+class BaseProductParameter extends Model implements Sortable
+{
+    use SortableTrait;
+
+    protected $table = 'base_product_parameter';
+
+    protected $casts = [
+        'created_at' => 'datetime:Y-m-d H:i:s',
+        'updated_at' => 'datetime:Y-m-d H:i:s',
+        'content' => 'json', // 将 attributes 字段转换为数组
+    ];
+
+    protected $fillable = ['name', 'order'];
+
+    // 可选:你可以在这里自定义排序配置
+    public $sortable = [
+        'order_column_name' => 'order',  // 排序字段
+        'sort_when_creating' => true,    // 创建时自动排序
+    ];
+
+}

+ 245 - 0
dcat_admin_ide_helper.php

@@ -0,0 +1,245 @@
+<?php
+
+/**
+ * A helper file for Dcat Admin, to provide autocomplete information to your IDE
+ *
+ * This file should not be included in your code, only analyzed by your IDE!
+ *
+ * @author jqh <841324345@qq.com>
+ */
+namespace Dcat\Admin {
+    use Illuminate\Support\Collection;
+
+    /**
+     * @property Grid\Column|Collection id
+     * @property Grid\Column|Collection name
+     * @property Grid\Column|Collection type
+     * @property Grid\Column|Collection version
+     * @property Grid\Column|Collection detail
+     * @property Grid\Column|Collection created_at
+     * @property Grid\Column|Collection updated_at
+     * @property Grid\Column|Collection is_enabled
+     * @property Grid\Column|Collection parent_id
+     * @property Grid\Column|Collection order
+     * @property Grid\Column|Collection icon
+     * @property Grid\Column|Collection uri
+     * @property Grid\Column|Collection extension
+     * @property Grid\Column|Collection permission_id
+     * @property Grid\Column|Collection menu_id
+     * @property Grid\Column|Collection slug
+     * @property Grid\Column|Collection http_method
+     * @property Grid\Column|Collection http_path
+     * @property Grid\Column|Collection role_id
+     * @property Grid\Column|Collection user_id
+     * @property Grid\Column|Collection value
+     * @property Grid\Column|Collection username
+     * @property Grid\Column|Collection password
+     * @property Grid\Column|Collection avatar
+     * @property Grid\Column|Collection remember_token
+     * @property Grid\Column|Collection keywords
+     * @property Grid\Column|Collection sku
+     * @property Grid\Column|Collection category_id
+     * @property Grid\Column|Collection publish_date
+     * @property Grid\Column|Collection enabled
+     * @property Grid\Column|Collection content
+     * @property Grid\Column|Collection parameters
+     * @property Grid\Column|Collection parameter_id
+     * @property Grid\Column|Collection image_url
+     * @property Grid\Column|Collection product_id
+     * @property Grid\Column|Collection uuid
+     * @property Grid\Column|Collection connection
+     * @property Grid\Column|Collection queue
+     * @property Grid\Column|Collection payload
+     * @property Grid\Column|Collection exception
+     * @property Grid\Column|Collection failed_at
+     * @property Grid\Column|Collection email
+     * @property Grid\Column|Collection token
+     * @property Grid\Column|Collection tokenable_type
+     * @property Grid\Column|Collection tokenable_id
+     * @property Grid\Column|Collection abilities
+     * @property Grid\Column|Collection last_used_at
+     * @property Grid\Column|Collection expires_at
+     * @property Grid\Column|Collection email_verified_at
+     *
+     * @method Grid\Column|Collection id(string $label = null)
+     * @method Grid\Column|Collection name(string $label = null)
+     * @method Grid\Column|Collection type(string $label = null)
+     * @method Grid\Column|Collection version(string $label = null)
+     * @method Grid\Column|Collection detail(string $label = null)
+     * @method Grid\Column|Collection created_at(string $label = null)
+     * @method Grid\Column|Collection updated_at(string $label = null)
+     * @method Grid\Column|Collection is_enabled(string $label = null)
+     * @method Grid\Column|Collection parent_id(string $label = null)
+     * @method Grid\Column|Collection order(string $label = null)
+     * @method Grid\Column|Collection icon(string $label = null)
+     * @method Grid\Column|Collection uri(string $label = null)
+     * @method Grid\Column|Collection extension(string $label = null)
+     * @method Grid\Column|Collection permission_id(string $label = null)
+     * @method Grid\Column|Collection menu_id(string $label = null)
+     * @method Grid\Column|Collection slug(string $label = null)
+     * @method Grid\Column|Collection http_method(string $label = null)
+     * @method Grid\Column|Collection http_path(string $label = null)
+     * @method Grid\Column|Collection role_id(string $label = null)
+     * @method Grid\Column|Collection user_id(string $label = null)
+     * @method Grid\Column|Collection value(string $label = null)
+     * @method Grid\Column|Collection username(string $label = null)
+     * @method Grid\Column|Collection password(string $label = null)
+     * @method Grid\Column|Collection avatar(string $label = null)
+     * @method Grid\Column|Collection remember_token(string $label = null)
+     * @method Grid\Column|Collection keywords(string $label = null)
+     * @method Grid\Column|Collection sku(string $label = null)
+     * @method Grid\Column|Collection category_id(string $label = null)
+     * @method Grid\Column|Collection publish_date(string $label = null)
+     * @method Grid\Column|Collection enabled(string $label = null)
+     * @method Grid\Column|Collection content(string $label = null)
+     * @method Grid\Column|Collection parameters(string $label = null)
+     * @method Grid\Column|Collection parameter_id(string $label = null)
+     * @method Grid\Column|Collection image_url(string $label = null)
+     * @method Grid\Column|Collection product_id(string $label = null)
+     * @method Grid\Column|Collection uuid(string $label = null)
+     * @method Grid\Column|Collection connection(string $label = null)
+     * @method Grid\Column|Collection queue(string $label = null)
+     * @method Grid\Column|Collection payload(string $label = null)
+     * @method Grid\Column|Collection exception(string $label = null)
+     * @method Grid\Column|Collection failed_at(string $label = null)
+     * @method Grid\Column|Collection email(string $label = null)
+     * @method Grid\Column|Collection token(string $label = null)
+     * @method Grid\Column|Collection tokenable_type(string $label = null)
+     * @method Grid\Column|Collection tokenable_id(string $label = null)
+     * @method Grid\Column|Collection abilities(string $label = null)
+     * @method Grid\Column|Collection last_used_at(string $label = null)
+     * @method Grid\Column|Collection expires_at(string $label = null)
+     * @method Grid\Column|Collection email_verified_at(string $label = null)
+     */
+    class Grid {}
+
+    class MiniGrid extends Grid {}
+
+    /**
+     * @property Show\Field|Collection id
+     * @property Show\Field|Collection name
+     * @property Show\Field|Collection type
+     * @property Show\Field|Collection version
+     * @property Show\Field|Collection detail
+     * @property Show\Field|Collection created_at
+     * @property Show\Field|Collection updated_at
+     * @property Show\Field|Collection is_enabled
+     * @property Show\Field|Collection parent_id
+     * @property Show\Field|Collection order
+     * @property Show\Field|Collection icon
+     * @property Show\Field|Collection uri
+     * @property Show\Field|Collection extension
+     * @property Show\Field|Collection permission_id
+     * @property Show\Field|Collection menu_id
+     * @property Show\Field|Collection slug
+     * @property Show\Field|Collection http_method
+     * @property Show\Field|Collection http_path
+     * @property Show\Field|Collection role_id
+     * @property Show\Field|Collection user_id
+     * @property Show\Field|Collection value
+     * @property Show\Field|Collection username
+     * @property Show\Field|Collection password
+     * @property Show\Field|Collection avatar
+     * @property Show\Field|Collection remember_token
+     * @property Show\Field|Collection keywords
+     * @property Show\Field|Collection sku
+     * @property Show\Field|Collection category_id
+     * @property Show\Field|Collection publish_date
+     * @property Show\Field|Collection enabled
+     * @property Show\Field|Collection content
+     * @property Show\Field|Collection parameters
+     * @property Show\Field|Collection parameter_id
+     * @property Show\Field|Collection image_url
+     * @property Show\Field|Collection product_id
+     * @property Show\Field|Collection uuid
+     * @property Show\Field|Collection connection
+     * @property Show\Field|Collection queue
+     * @property Show\Field|Collection payload
+     * @property Show\Field|Collection exception
+     * @property Show\Field|Collection failed_at
+     * @property Show\Field|Collection email
+     * @property Show\Field|Collection token
+     * @property Show\Field|Collection tokenable_type
+     * @property Show\Field|Collection tokenable_id
+     * @property Show\Field|Collection abilities
+     * @property Show\Field|Collection last_used_at
+     * @property Show\Field|Collection expires_at
+     * @property Show\Field|Collection email_verified_at
+     *
+     * @method Show\Field|Collection id(string $label = null)
+     * @method Show\Field|Collection name(string $label = null)
+     * @method Show\Field|Collection type(string $label = null)
+     * @method Show\Field|Collection version(string $label = null)
+     * @method Show\Field|Collection detail(string $label = null)
+     * @method Show\Field|Collection created_at(string $label = null)
+     * @method Show\Field|Collection updated_at(string $label = null)
+     * @method Show\Field|Collection is_enabled(string $label = null)
+     * @method Show\Field|Collection parent_id(string $label = null)
+     * @method Show\Field|Collection order(string $label = null)
+     * @method Show\Field|Collection icon(string $label = null)
+     * @method Show\Field|Collection uri(string $label = null)
+     * @method Show\Field|Collection extension(string $label = null)
+     * @method Show\Field|Collection permission_id(string $label = null)
+     * @method Show\Field|Collection menu_id(string $label = null)
+     * @method Show\Field|Collection slug(string $label = null)
+     * @method Show\Field|Collection http_method(string $label = null)
+     * @method Show\Field|Collection http_path(string $label = null)
+     * @method Show\Field|Collection role_id(string $label = null)
+     * @method Show\Field|Collection user_id(string $label = null)
+     * @method Show\Field|Collection value(string $label = null)
+     * @method Show\Field|Collection username(string $label = null)
+     * @method Show\Field|Collection password(string $label = null)
+     * @method Show\Field|Collection avatar(string $label = null)
+     * @method Show\Field|Collection remember_token(string $label = null)
+     * @method Show\Field|Collection keywords(string $label = null)
+     * @method Show\Field|Collection sku(string $label = null)
+     * @method Show\Field|Collection category_id(string $label = null)
+     * @method Show\Field|Collection publish_date(string $label = null)
+     * @method Show\Field|Collection enabled(string $label = null)
+     * @method Show\Field|Collection content(string $label = null)
+     * @method Show\Field|Collection parameters(string $label = null)
+     * @method Show\Field|Collection parameter_id(string $label = null)
+     * @method Show\Field|Collection image_url(string $label = null)
+     * @method Show\Field|Collection product_id(string $label = null)
+     * @method Show\Field|Collection uuid(string $label = null)
+     * @method Show\Field|Collection connection(string $label = null)
+     * @method Show\Field|Collection queue(string $label = null)
+     * @method Show\Field|Collection payload(string $label = null)
+     * @method Show\Field|Collection exception(string $label = null)
+     * @method Show\Field|Collection failed_at(string $label = null)
+     * @method Show\Field|Collection email(string $label = null)
+     * @method Show\Field|Collection token(string $label = null)
+     * @method Show\Field|Collection tokenable_type(string $label = null)
+     * @method Show\Field|Collection tokenable_id(string $label = null)
+     * @method Show\Field|Collection abilities(string $label = null)
+     * @method Show\Field|Collection last_used_at(string $label = null)
+     * @method Show\Field|Collection expires_at(string $label = null)
+     * @method Show\Field|Collection email_verified_at(string $label = null)
+     */
+    class Show {}
+
+    /**
+     
+     */
+    class Form {}
+
+}
+
+namespace Dcat\Admin\Grid {
+    /**
+     
+     */
+    class Column {}
+
+    /**
+     
+     */
+    class Filter {}
+}
+
+namespace Dcat\Admin\Show {
+    /**
+     
+     */
+    class Field {}
+}

+ 16 - 0
lang/en/base-product-category.php

@@ -0,0 +1,16 @@
+<?php 
+return [
+    'labels' => [
+        'BaseProductCategory' => 'BaseProductCategory',
+        'base-product-category' => 'BaseProductCategory',
+    ],
+    'fields' => [
+        'name' => 'name',
+        'parent_id' => 'parent_id',
+        'order' => 'order',
+        'enabled' => 'enabled',
+        'parameter_id' => 'parameter_id',
+    ],
+    'options' => [
+    ],
+];

+ 15 - 0
lang/en/base-product-parameter.php

@@ -0,0 +1,15 @@
+<?php 
+return [
+    'labels' => [
+        'BaseProductParameter' => 'BaseProductParameter',
+        'base-product-parameter' => 'BaseProductParameter',
+    ],
+    'fields' => [
+        'name' => 'name',
+        'order' => 'order',
+        'enabled' => 'enabled',
+        'content' => 'content',
+    ],
+    'options' => [
+    ],
+];

+ 21 - 0
lang/en/base-product.php

@@ -0,0 +1,21 @@
+<?php 
+return [
+    'labels' => [
+        'BaseProduct' => 'BaseProduct',
+        'base-product' => 'BaseProduct',
+    ],
+    'fields' => [
+        'title' => 'title',
+        'keywords' => 'keywords',
+        'description' => 'description',
+        'sku' => 'sku',
+        'category_id' => 'category_id',
+        'publish_date' => 'issuance date',
+        'order' => 'order',
+        'enabled' => 'enabled',
+        'content' => 'content',
+        'parameters' => 'parameters',
+    ],
+    'options' => [
+    ],
+];