2019_10_09_055019_create_table_interest_circles.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateTableInterestCircles extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('interest_circles', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->string('name', 20)->default('')->comment('圈子名称');
  17. $table->string('notice')->default('')->comment('圈子公告');
  18. $table->string('image')->default('')->comment('圈子主图');
  19. $table->tinyInteger('join_limit')->default(0)->comment('进入限制 0否1是');
  20. $table->tinyInteger('limit_condition')->default(0)->comment('回答限制 单位 天');
  21. $table->mediumText('join_question')->comment('限制问题');
  22. $table->string('limit_article_ids')->default('')->comment('收录话题限制 空为不限制');
  23. $table->mediumText('contains_function')->comment('包含功能');
  24. $table->integer('article_count')->default(0)->comment('圈子内容数');
  25. $table->integer('message_count')->default(0)->comment('圈子留言数');
  26. $table->integer('view_count')->default(0)->comment('圈子浏览数');
  27. $table->integer('join_count')->default(0)->comment('圈子参与人数');
  28. $table->integer('picture_count')->default(0)->comment('相册图片数');
  29. $table->tinyInteger('is_recommend')->default(0)->comment('是否推荐 0未推荐1已推荐');
  30. $table->tinyInteger('is_open')->default(1)->comment('开启状态 0否1是');
  31. $table->softDeletes();
  32. $table->timestamps();
  33. });
  34. }
  35. /**
  36. * Reverse the migrations.
  37. *
  38. * @return void
  39. */
  40. public function down()
  41. {
  42. Schema::dropIfExists('interest_circles');
  43. }
  44. }