| 12345678910111213141516171819202122232425262728293031323334353637 | <?phpuse Illuminate\Support\Facades\Schema;use Illuminate\Database\Schema\Blueprint;use Illuminate\Database\Migrations\Migration;class CreateLeavesTable extends Migration{    /**     * Run the migrations.     *     * @return void     */    public function up()    {        Schema::create('leaves', function (Blueprint $table) {            $table->increments('id');            $table->unsignedInteger('student_id')->nullable()->comment('学员ID');            $table->unsignedInteger('course_id')->nullable()->comment('课程ID');            $table->unsignedInteger('student_course_id')->nullable()->comment('学员课程(合同)ID');            $table->tinyInteger('type')->nullable()->comment('请假类型:1短假;2长假');            $table->string('days', 50)->nullable()->comment('天数');            $table->string('remark', 200)->nullable()->comment('说明');            $table->timestamps();        });    }    /**     * Reverse the migrations.     *     * @return void     */    public function down()    {        Schema::dropIfExists('leaves');    }}
 |