duqinya 6 年 前
コミット
d3c051b6fe

+ 37 - 0
database/migrations/2019_04_28_022240_create_table_subject_table.php

@@ -0,0 +1,37 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateTableSubjectTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('cms_subject', function (Blueprint $table) {
+            $table->bigIncrements('id');
+            $table->integer('city_id');
+            $table->string('city_name',20)->comment('城市名称'); //城市名称
+            $table->string('title',70)->comment('专题名称');
+            $table->tinyInteger('show_type')->default(0)->comment('商品展示方式:0:左图右字;1:通栏大图;2:左右滑动');
+            $table->tinyInteger('is_open')->default(0)->comment('是否启用:0:开启;1:关闭');
+            $table->timestamps();
+            $table->softDeletes();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+            Schema::drop('cms_subject');
+    }
+}

+ 33 - 0
database/migrations/2019_04_28_025052_create_cms_subject_product_table.php

@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateCmsSubjectProductTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('cms_subject_product', function (Blueprint $table) {
+            $table->bigIncrements('id');
+            $table->integer('sort')->comment('商品排序');
+            $table->timestamps();
+            $table->softDeletes();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::drop('cms_subject_product');
+    }
+}

+ 36 - 0
database/migrations/2019_04_28_025655_create_cms_content_template_table.php

@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateCmsContentTemplateTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('cms_content_template', function (Blueprint $table) {
+            $table->bigIncrements('id');
+            $table->integer('city_id')->comment('城市ID');
+            $table->string('city_name',20)->comment('城市名称');
+            $table->string('title',200)->comment('模板名称');
+            $table->tinyInteger('apply_type')->default(1)->comment('对应模板:0:团购首页;1:菜市场首页');
+            $table->tinyInteger('is_open')->default(1)->comment('是否启用:0:启用;1:禁用');
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::drop('cms_content_template');
+    }
+}

+ 33 - 0
database/migrations/2019_04_28_030611_create_cms_content_template_set_table.php

@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateCmsContentTemplateSetTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('cms_content_template_set', function (Blueprint $table) {
+            $table->bigIncrements('id');
+            $table->json('rule')->comment('设置项');
+            $table->tinyInteger('status')->default(0)->comment('状态:0:草稿;1:发布');
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::drop('cms_content_template_set');
+    }
+}

+ 32 - 0
database/migrations/2019_04_28_072523_add_cms_subject_product_table.php

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddCmsSubjectProductTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('cms_subject_product', function (Blueprint $table) {
+            $table->integer('subject_id')->comment('专题ID');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('cms_subject_product', function (Blueprint $table) {
+            $table->dropColumn(['subject_id']);
+        });
+    }
+}

+ 32 - 0
database/migrations/2019_04_28_084605_add_product_id_cms_subject_product_table.php

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddProductIdCmsSubjectProductTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('cms_subject_product', function (Blueprint $table) {
+            $table->string('product_id',20)->comment('商品ID');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('cms_subject_product', function (Blueprint $table) {
+            //
+        });
+    }
+}