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.

56 lines
1.8 KiB

<?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->string('url')->nullable()->comment('链接');
// 是否向用户发布
$table->boolean('is_publish')->nullable()->comment('是否向用户发布');
// 地址
$table->string('address')->nullable()->comment('地址');
// 介绍
$table->text('introduce')->nullable()->comment('介绍');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('calendars');
}
};