From 1fbb0087e5f6225a8fa698fa945da89c921f056f Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Tue, 7 Mar 2023 21:10:36 +0800 Subject: [PATCH] delete --- .../Http/Controllers/CategoryController.php | 67 ------------------- modules/Cms/Models/Category.php | 43 ------------ modules/Cms/Providers/CmsServiceProvider.php | 20 ------ .../2023_02_23_045220_create_cms_user.php | 43 ------------ ...2023_02_23_045616_create_cms_user_meta.php | 39 ----------- .../2023_02_23_051406_create_cms_comment.php | 48 ------------- ...3_02_23_051620_create_cms_comment_mata.php | 39 ----------- .../2023_02_23_052223_create_cms_links.php | 47 ------------- .../2023_02_23_052606_create_cms_options.php | 40 ----------- .../2023_02_23_053834_create_cms_posts.php | 48 ------------- ..._02_23_054326_create_cms_category_meta.php | 40 ----------- ...5135_create_cms_catetory_relationships.php | 40 ----------- .../2023_02_23_055515_create_cms_category.php | 42 ------------ modules/Cms/routes/route.php | 10 --- modules/Cms/views/category/create.vue | 43 ------------ modules/Cms/views/category/index.vue | 50 -------------- 16 files changed, 659 deletions(-) delete mode 100644 modules/Cms/Http/Controllers/CategoryController.php delete mode 100644 modules/Cms/Models/Category.php delete mode 100644 modules/Cms/Providers/CmsServiceProvider.php delete mode 100644 modules/Cms/database/migrations/2023_02_23_045220_create_cms_user.php delete mode 100644 modules/Cms/database/migrations/2023_02_23_045616_create_cms_user_meta.php delete mode 100644 modules/Cms/database/migrations/2023_02_23_051406_create_cms_comment.php delete mode 100644 modules/Cms/database/migrations/2023_02_23_051620_create_cms_comment_mata.php delete mode 100644 modules/Cms/database/migrations/2023_02_23_052223_create_cms_links.php delete mode 100644 modules/Cms/database/migrations/2023_02_23_052606_create_cms_options.php delete mode 100644 modules/Cms/database/migrations/2023_02_23_053834_create_cms_posts.php delete mode 100644 modules/Cms/database/migrations/2023_02_23_054326_create_cms_category_meta.php delete mode 100644 modules/Cms/database/migrations/2023_02_23_055135_create_cms_catetory_relationships.php delete mode 100644 modules/Cms/database/migrations/2023_02_23_055515_create_cms_category.php delete mode 100644 modules/Cms/routes/route.php delete mode 100644 modules/Cms/views/category/create.vue delete mode 100644 modules/Cms/views/category/index.vue diff --git a/modules/Cms/Http/Controllers/CategoryController.php b/modules/Cms/Http/Controllers/CategoryController.php deleted file mode 100644 index 8bb0879..0000000 --- a/modules/Cms/Http/Controllers/CategoryController.php +++ /dev/null @@ -1,67 +0,0 @@ -model->getList(); - } - - /** - * store - * - * @param Request $request - * @return mixed - */ - public function store(Request $request): mixed - { - return $this->model->storeBy($request->all()); - } - - /** - * show - * - * @param $id - * @return mixed - */ - public function show($id): mixed - { - return $this->model->firstBy($id); - } - - /** - * - * @param $id - * @param Request $request - * @return mixed - */ - public function update($id, Request $request): mixed - { - return $this->model->updateBy($id, $request->all()); - } - - /** - * - * @param $id - * @return bool|null - */ - public function destroy($id): ?bool - { - return $this->model->deleteBy($id); - } -} diff --git a/modules/Cms/Models/Category.php b/modules/Cms/Models/Category.php deleted file mode 100644 index aa30a1d..0000000 --- a/modules/Cms/Models/Category.php +++ /dev/null @@ -1,43 +0,0 @@ - 'like' - ]; -} diff --git a/modules/Cms/Providers/CmsServiceProvider.php b/modules/Cms/Providers/CmsServiceProvider.php deleted file mode 100644 index 6a0309d..0000000 --- a/modules/Cms/Providers/CmsServiceProvider.php +++ /dev/null @@ -1,20 +0,0 @@ -id(); - $table->string('nickname', 50)->comment('昵称'); - $table->string('password')->comment('密码'); - $table->string('email', 100)->comment('邮箱'); - $table->string('homepage')->comment('主页地址'); - $table->string('active_key')->comment('激活码'); - $table->tinyInteger('status')->default(0)->comment('状态 0 无需激活 1 未激活 2 激活'); - $table->creatorId(); - $table->createdAt(); - $table->updatedAt(); - $table->deletedAt(); - - $table->engine='InnoDB'; - $table->comment('用户管理表'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('cms_user'); - } -}; diff --git a/modules/Cms/database/migrations/2023_02_23_045616_create_cms_user_meta.php b/modules/Cms/database/migrations/2023_02_23_045616_create_cms_user_meta.php deleted file mode 100644 index 0bce207..0000000 --- a/modules/Cms/database/migrations/2023_02_23_045616_create_cms_user_meta.php +++ /dev/null @@ -1,39 +0,0 @@ -id(); - $table->integer('user_id')->nullable()->comment('用户ID'); - $table->string('key')->nullable()->comment('元数据的 key'); - $table->string('value')->nullable()->comment('元数据的值'); - $table->createdAt(); - $table->updatedAt(); - $table->deletedAt(); - - $table->engine='InnoDB'; - $table->comment('用户关联的元数据表'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('cms_user_meta'); - } -}; diff --git a/modules/Cms/database/migrations/2023_02_23_051406_create_cms_comment.php b/modules/Cms/database/migrations/2023_02_23_051406_create_cms_comment.php deleted file mode 100644 index cabd362..0000000 --- a/modules/Cms/database/migrations/2023_02_23_051406_create_cms_comment.php +++ /dev/null @@ -1,48 +0,0 @@ -id(); - $table->integer('parent_id')->comment('父级ID'); - $table->integer('user_id')->default(0)->comment('用户ID,不一定存在'); - $table->integer('post_id')->default(0)->comment('文章ID'); - $table->string('author')->nullable()->comment('作者'); - $table->string('author_email')->comment('作者邮箱'); - $table->string('author_homepage')->comment('作者的主页'); - $table->string('author_ip')->comment('ip地址'); - $table->text('content')->comment('评论内容'); - $table->tinyInteger('is_approved')->default(1)->comment('1 未批准 2 批准'); - $table->string('user_agent')->comment('评论者的USER AGENT'); - $table->string('type')->default(1)->comment('评论类型 1 普通 2 回复'); - $table->creatorId(); - $table->createdAt(); - $table->updatedAt(); - $table->deletedAt(); - - $table->engine='InnoDB'; - $table->comment('评论表'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('cms_comment'); - } -}; diff --git a/modules/Cms/database/migrations/2023_02_23_051620_create_cms_comment_mata.php b/modules/Cms/database/migrations/2023_02_23_051620_create_cms_comment_mata.php deleted file mode 100644 index 55ccc78..0000000 --- a/modules/Cms/database/migrations/2023_02_23_051620_create_cms_comment_mata.php +++ /dev/null @@ -1,39 +0,0 @@ -id(); - $table->integer('comment_id')->comment('评论ID'); - $table->string('key')->comment('评论元数据 KEY'); - $table->string('value')->comment('评论元数据 Value'); - $table->createdAt(); - $table->updatedAt(); - $table->deletedAt(); - - $table->engine='InnoDB'; - $table->comment('评论元数据表'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('cms_comment_mata'); - } -}; diff --git a/modules/Cms/database/migrations/2023_02_23_052223_create_cms_links.php b/modules/Cms/database/migrations/2023_02_23_052223_create_cms_links.php deleted file mode 100644 index d91dfe3..0000000 --- a/modules/Cms/database/migrations/2023_02_23_052223_create_cms_links.php +++ /dev/null @@ -1,47 +0,0 @@ -id(); - $table->string('name')->comment('链接名称'); - $table->string('url')->comment('链接的 URL'); - $table->string('image')->comment('链接图片'); - $table->tinyInteger('is_target')->default(1)->comment('打开方式 1 本窗口打开 2 新窗口打开'); - $table->tinyText('description')->comment('描述'); - $table->tinyInteger('is_visible')->default(1)->comment('是否可见 1 不可见 2 可见'); - $table->integer('rating')->comment('评分等级'); - $table->string('rel')->comment('友情链接'); - $table->string('rel_notes', 1000)->comment('友情链接注释'); - $table->string('rss')->comment('rss 链接地址'); - $table->creatorId(); - $table->createdAt(); - $table->updatedAt(); - $table->deletedAt(); - - $table->engine='InnoDB'; - $table->comment('链接表'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('cms_links'); - } -}; diff --git a/modules/Cms/database/migrations/2023_02_23_052606_create_cms_options.php b/modules/Cms/database/migrations/2023_02_23_052606_create_cms_options.php deleted file mode 100644 index a26dfc3..0000000 --- a/modules/Cms/database/migrations/2023_02_23_052606_create_cms_options.php +++ /dev/null @@ -1,40 +0,0 @@ -id(); - $table->string('key')->comment('key'); - $table->text('value')->comment('value 值'); - $table->tinyInteger('autoload')->default(1)->comment('是否自动载入 1 是 2 否'); - $table->creatorId(); - $table->createdAt(); - $table->updatedAt(); - $table->deletedAt(); - - $table->engine='InnoDB'; - $table->comment('选项, key value'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('cms_options'); - } -}; diff --git a/modules/Cms/database/migrations/2023_02_23_053834_create_cms_posts.php b/modules/Cms/database/migrations/2023_02_23_053834_create_cms_posts.php deleted file mode 100644 index 52404ab..0000000 --- a/modules/Cms/database/migrations/2023_02_23_053834_create_cms_posts.php +++ /dev/null @@ -1,48 +0,0 @@ -id(); - $table->string('author')->comment('作者'); - $table->string('title')->comment('标题'); - $table->longText('content')->comment('内容'); - $table->tinyText('excerpt')->comment('摘录'); - $table->tinyInteger('status')->default(1)->comment('文章状态 1 草稿 2 发布'); - $table->tinyInteger('is_can_comment')->default(1)->comment('是否可以评论 1 可以 2 不可以'); - $table->string('password')->comment('文章查看密码'); - $table->integer('order')->default(1)->comment('排序 默认 1'); - $table->integer('user_id')->default(0)->comment('用户ID 0 未知'); - $table->tinyInteger('type')->default(1)->comment('文章类型 1 文章 2 页面'); - $table->integer('comment_count')->default(0)->comment('评论总数'); - $table->creatorId(); - $table->createdAt(); - $table->updatedAt(); - $table->deletedAt(); - - $table->engine='InnoDB'; - $table->comment('文章内容表'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('cms_posts'); - } -}; diff --git a/modules/Cms/database/migrations/2023_02_23_054326_create_cms_category_meta.php b/modules/Cms/database/migrations/2023_02_23_054326_create_cms_category_meta.php deleted file mode 100644 index f935d58..0000000 --- a/modules/Cms/database/migrations/2023_02_23_054326_create_cms_category_meta.php +++ /dev/null @@ -1,40 +0,0 @@ -id(); - $table->integer('category_id')->comment('分类ID'); - $table->string('key')->comment('元数据key'); - $table->string('value')->comment('元数据的值'); - $table->creatorId(); - $table->createdAt(); - $table->updatedAt(); - $table->deletedAt(); - - $table->engine='InnoDB'; - $table->comment('分类元数据'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('cms_category_meta'); - } -}; diff --git a/modules/Cms/database/migrations/2023_02_23_055135_create_cms_catetory_relationships.php b/modules/Cms/database/migrations/2023_02_23_055135_create_cms_catetory_relationships.php deleted file mode 100644 index c1bb742..0000000 --- a/modules/Cms/database/migrations/2023_02_23_055135_create_cms_catetory_relationships.php +++ /dev/null @@ -1,40 +0,0 @@ -id(); - $table->integer('category_id')->comment('分类ID'); - $table->integer('object_id')->comment('文章ID/链接ID'); - $table->tinyInteger('type')->default(1)->comment('类型 1 文章 2 链接'); - $table->creatorId(); - $table->createdAt(); - $table->updatedAt(); - $table->deletedAt(); - - $table->engine='InnoDB'; - $table->comment('分类关系'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('cms_catetory_relationships'); - } -}; diff --git a/modules/Cms/database/migrations/2023_02_23_055515_create_cms_category.php b/modules/Cms/database/migrations/2023_02_23_055515_create_cms_category.php deleted file mode 100644 index 0d1637e..0000000 --- a/modules/Cms/database/migrations/2023_02_23_055515_create_cms_category.php +++ /dev/null @@ -1,42 +0,0 @@ -id(); - $table->integer('parent_id')->default(0)->comment('父级ID'); - $table->string('name')->comment('名称'); - $table->string('slug')->comment('缩略名'); - $table->integer('order')->default(1)->comment('排序 默认 1'); - $table->integer('post_count')->default(0)->comment('文章数量'); - $table->creatorId(); - $table->createdAt(); - $table->updatedAt(); - $table->deletedAt(); - - $table->engine='InnoDB'; - $table->comment('分类'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('cms_category'); - } -}; diff --git a/modules/Cms/routes/route.php b/modules/Cms/routes/route.php deleted file mode 100644 index 83fcc06..0000000 --- a/modules/Cms/routes/route.php +++ /dev/null @@ -1,10 +0,0 @@ -group(function(){ - - Route::apiResource('category', CategoryController::class); - //next -}); diff --git a/modules/Cms/views/category/create.vue b/modules/Cms/views/category/create.vue deleted file mode 100644 index 3afd760..0000000 --- a/modules/Cms/views/category/create.vue +++ /dev/null @@ -1,43 +0,0 @@ - - - diff --git a/modules/Cms/views/category/index.vue b/modules/Cms/views/category/index.vue deleted file mode 100644 index c0b3c88..0000000 --- a/modules/Cms/views/category/index.vue +++ /dev/null @@ -1,50 +0,0 @@ - -