2018_10_11_172043_create_tasks_table.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateTasksTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('tasks', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->string('title')->comment('任务标题');
  17. $table->string('t_alias')->comment('任务别名');
  18. $table->integer('points')->comment('积分');
  19. $table->tinyInteger('once')->comment('是否单次任务(0:否 1:是)');
  20. $table->tinyInteger('becount')->comment('是否统计次数(0:否 1:是)');
  21. $table->tinyInteger('times')->comment('赠送积分次数');
  22. $table->tinyInteger('utype')->comment('会员类型');
  23. $table->tinyInteger('dayly')->comment('日常任务');
  24. $table->tinyInteger('status')->comment('状态(0:禁止 1:可用)');
  25. $table->timestamps();
  26. });
  27. }
  28. /**
  29. * Reverse the migrations.
  30. *
  31. * @return void
  32. */
  33. public function down()
  34. {
  35. Schema::dropIfExists('tasks');
  36. }
  37. }