1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateTableInterestCircles extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('interest_circles', function (Blueprint $table) {
- $table->bigIncrements('id');
- $table->string('name', 20)->default('')->comment('圈子名称');
- $table->string('notice')->default('')->comment('圈子公告');
- $table->string('image')->default('')->comment('圈子主图');
- $table->tinyInteger('join_limit')->default(0)->comment('进入限制 0否1是');
- $table->tinyInteger('limit_condition')->default(0)->comment('回答限制 单位 天');
- $table->mediumText('join_question')->comment('限制问题');
- $table->string('limit_article_ids')->default('')->comment('收录话题限制 空为不限制');
- $table->mediumText('contains_function')->comment('包含功能');
- $table->integer('article_count')->default(0)->comment('圈子内容数');
- $table->integer('message_count')->default(0)->comment('圈子留言数');
- $table->integer('view_count')->default(0)->comment('圈子浏览数');
- $table->integer('join_count')->default(0)->comment('圈子参与人数');
- $table->integer('picture_count')->default(0)->comment('相册图片数');
- $table->tinyInteger('is_recommend')->default(0)->comment('是否推荐 0未推荐1已推荐');
- $table->tinyInteger('is_open')->default(1)->comment('开启状态 0否1是');
- $table->softDeletes();
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('interest_circles');
- }
- }
|