2018_06_23_132837_create_check_cards_table.php 966 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateCheckCardsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('check_cards', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->unsignedInteger('student_id')->nullable()->comment('学员ID');
  17. $table->unsignedInteger('student_course_id')->nullable()->comment('所选课程ID');
  18. $table->dateTime('begin_date_time')->nullable()->comment('开始打卡时间');
  19. $table->dateTime('end_date_time')->nullable()->comment('结束打卡时间');
  20. $table->timestamps();
  21. });
  22. }
  23. /**
  24. * Reverse the migrations.
  25. *
  26. * @return void
  27. */
  28. public function down()
  29. {
  30. Schema::dropIfExists('check_cards');
  31. }
  32. }