refactor: 去除分类管理seo相关项

This commit is contained in:
2025-02-28 10:09:47 +08:00
parent 27935b529f
commit a0e90d0a06
6 changed files with 5 additions and 32 deletions

View File

@@ -37,10 +37,7 @@ class ArticleCategory
$category = ArticleCategoryModel::withoutField([ $category = ArticleCategoryModel::withoutField([
'language_id', 'language_id',
'deleted_at', 'deleted_at'
'seo_title',
'seo_keywords',
'seo_desc',
]) ])
->language(request()->lang_id) ->language(request()->lang_id)
->where(function($query) use($param) { ->where(function($query) use($param) {
@@ -76,10 +73,7 @@ class ArticleCategory
$post = request()->post([ $post = request()->post([
'name', 'name',
'sort' => 0, 'sort' => 0,
'is_show' => 1, 'is_show' => 1
'seo_title',
'seo_keywords',
'seo_desc',
]); ]);
$data = array_merge($post, ['language_id' => request()->lang_id]); $data = array_merge($post, ['language_id' => request()->lang_id]);
@@ -102,10 +96,7 @@ class ArticleCategory
$put = request()->put([ $put = request()->put([
'name', 'name',
'sort', 'sort',
'is_show', 'is_show'
'seo_title',
'seo_keywords',
'seo_desc',
]); ]);
$data = array_merge($put, ['language_id' => request()->lang_id]); $data = array_merge($put, ['language_id' => request()->lang_id]);

View File

@@ -74,10 +74,7 @@ class ProductCategory
'related_tco_category', 'related_tco_category',
'sort', 'sort',
'level' => 1, 'level' => 1,
'is_show' => 1, 'is_show' => 1
'seo_title',
'seo_keywords',
'seo_desc'
]); ]);
if (empty($post['unique_id'])) { if (empty($post['unique_id'])) {
$post['unique_id'] = md5(uniqid()); $post['unique_id'] = md5(uniqid());
@@ -120,10 +117,7 @@ class ProductCategory
'related_tco_category', 'related_tco_category',
'sort', 'sort',
'level' => 1, 'level' => 1,
'is_show' => 1, 'is_show' => 1
'seo_title',
'seo_keywords',
'seo_desc'
]); ]);
$data = array_merge($put, [ $data = array_merge($put, [
'id' => $id, 'id' => $id,

View File

@@ -26,9 +26,6 @@ class ArticleCategoryBaseModel extends BaseModel
'sort' => 'int', 'sort' => 'int',
'level' => 'int', 'level' => 'int',
'is_show' => 'int', 'is_show' => 'int',
'seo_title' => 'string',
'seo_keywords' => 'string',
'seo_desc' => 'string',
'created_at' => 'datetime', 'created_at' => 'datetime',
'updated_at' => 'datetime', 'updated_at' => 'datetime',
'deleted_at' => 'datetime', 'deleted_at' => 'datetime',

View File

@@ -28,9 +28,6 @@ class ProductCategoryBaseModel extends BaseModel
'sort' => 'int', 'sort' => 'int',
'level' => 'int', 'level' => 'int',
'is_show' => 'int', 'is_show' => 'int',
'seo_title' => 'string',
'seo_keywords' => 'string',
'seo_desc' => 'string',
'created_at' => 'datetime', 'created_at' => 'datetime',
'updated_at' => 'datetime', 'updated_at' => 'datetime',
'deleted_at' => 'datetime', 'deleted_at' => 'datetime',

View File

@@ -39,9 +39,6 @@ class CreateProductCategory extends Migrator
->addColumn('sort', 'integer', ['null' => false, 'default' => 0, 'comment' => '排序']) ->addColumn('sort', 'integer', ['null' => false, 'default' => 0, 'comment' => '排序'])
->addColumn('level', 'integer', ['limit' => MysqlAdapter::INT_TINY,'null' => false, 'default' => 1, 'comment' => '层级']) ->addColumn('level', 'integer', ['limit' => MysqlAdapter::INT_TINY,'null' => false, 'default' => 1, 'comment' => '层级'])
->addColumn('is_show', 'boolean', ['null' => false, 'default' => 1, 'comment' => '是否显示:1是,0否']) ->addColumn('is_show', 'boolean', ['null' => false, 'default' => 1, 'comment' => '是否显示:1是,0否'])
->addColumn('seo_title', 'string', ['limit' => 255, 'default' => null, 'comment' => 'SEO标题'])
->addColumn('seo_keywords', 'string', ['limit' => 255, 'default' => null, 'comment' => 'SEO关键字'])
->addColumn('seo_desc', 'string', ['limit' => 255, 'default' => null, 'comment' => 'SEO描述'])
->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '新增时间']) ->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '新增时间'])
->addColumn('updated_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'update' => 'CURRENT_TIMESTAMP', 'comment' => '更新时间']) ->addColumn('updated_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'update' => 'CURRENT_TIMESTAMP', 'comment' => '更新时间'])
->addColumn('deleted_at', 'timestamp', ['null' => true, 'comment' => '删除时间']) ->addColumn('deleted_at', 'timestamp', ['null' => true, 'comment' => '删除时间'])

View File

@@ -38,9 +38,6 @@ class CreateArticleCategory extends Migrator
->addColumn('sort', 'integer', ['null' => false, 'default' => 0, 'comment' => '排序']) ->addColumn('sort', 'integer', ['null' => false, 'default' => 0, 'comment' => '排序'])
->addColumn('level', 'integer', ['limit' => MysqlAdapter::INT_TINY,'null' => false, 'default' => 1, 'comment' => '层级']) ->addColumn('level', 'integer', ['limit' => MysqlAdapter::INT_TINY,'null' => false, 'default' => 1, 'comment' => '层级'])
->addColumn('is_show', 'boolean', ['null' => false, 'default' => 1, 'comment' => '是否显示:1是,0否']) ->addColumn('is_show', 'boolean', ['null' => false, 'default' => 1, 'comment' => '是否显示:1是,0否'])
->addColumn('seo_title', 'string', ['limit' => 255, 'default' => null, 'comment' => 'SEO标题'])
->addColumn('seo_keywords', 'string', ['limit' => 255, 'default' => null, 'comment' => 'SEO关键字'])
->addColumn('seo_desc', 'string', ['limit' => 255, 'default' => null, 'comment' => 'SEO描述'])
->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '新增时间']) ->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '新增时间'])
->addColumn('updated_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'update' => 'CURRENT_TIMESTAMP', 'comment' => '更新时间']) ->addColumn('updated_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'update' => 'CURRENT_TIMESTAMP', 'comment' => '更新时间'])
->addColumn('deleted_at', 'timestamp', ['null' => true, 'comment' => '删除时间']) ->addColumn('deleted_at', 'timestamp', ['null' => true, 'comment' => '删除时间'])