You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
|
|
|
|
|
return new class extends Migration {
|
|
|
|
|
/**
|
|
|
|
|
* Run the migrations.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function up()
|
|
|
|
|
{
|
|
|
|
|
Schema::create('calendars', function (Blueprint $table) {
|
|
|
|
|
$table->id();
|
|
|
|
|
// 类型
|
|
|
|
|
$table->tinyInteger('type')->nullable()->comment('类型1课程2课堂3事件');
|
|
|
|
|
//课程id
|
|
|
|
|
$table->integer('course_id')->nullable()->comment('课程id');
|
|
|
|
|
// 课程课堂id
|
|
|
|
|
$table->integer('course_content_id')->nullable()->comment('课程课堂id');
|
|
|
|
|
// 日期
|
|
|
|
|
$table->date('date')->nullable()->comment('日期');
|
|
|
|
|
// 标题
|
|
|
|
|
$table->string('title')->nullable()->comment('标题');
|
|
|
|
|
// 内容
|
|
|
|
|
$table->mediumText('content')->nullable()->comment('内容');
|
|
|
|
|
// 开始时间
|
|
|
|
|
$table->dateTime('start_time')->nullable()->comment('开始时间');
|
|
|
|
|
// 结束时间
|
|
|
|
|
$table->dateTime('end_time')->nullable()->comment('结束时间');
|
|
|
|
|
$table->timestamps();
|
|
|
|
|
$table->softDeletes();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Reverse the migrations.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function down()
|
|
|
|
|
{
|
|
|
|
|
Schema::dropIfExists('calendars');
|
|
|
|
|
}
|
|
|
|
|
};
|