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.
59 lines
2.7 KiB
59 lines
2.7 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('courses', function (Blueprint $table) {
|
|
$table->comment('课程管理');
|
|
$table->increments('id');
|
|
$table->integer('admin_id')->nullable();
|
|
$table->integer('department_id')->nullable();
|
|
$table->string('name')->nullable()->comment('名字');
|
|
$table->integer('image_id')->nullable()->comment('图片');
|
|
$table->integer('qun_image_id')->nullable()->comment('群图片');
|
|
$table->date('start_date')->nullable()->comment('开始时间');
|
|
$table->date('end_date')->nullable()->comment('结束时间');
|
|
$table->date('sign_start_date')->nullable()->comment('报名开始时间');
|
|
$table->date('sign_end_date')->nullable()->comment('报名结束时间');
|
|
$table->integer('type')->nullable()->default(true)->comment('类别-动态获取');
|
|
$table->mediumText('content')->nullable()->comment('内容');
|
|
$table->integer('total')->nullable()->comment('开课人数');
|
|
$table->string('class')->nullable()->comment('所在班级');
|
|
$table->dateTime('created_at')->nullable();
|
|
$table->dateTime('updated_at')->nullable();
|
|
$table->dateTime('deleted_at')->nullable();
|
|
$table->tinyInteger('status')->nullable()->default(0)->comment('状态');
|
|
$table->tinyInteger('course_content_status')->nullable()->default(0)->comment('状态');
|
|
$table->integer('teacher_id')->nullable()->comment('班主任id');
|
|
$table->tinyInteger('is_arrange')->nullable()->comment('是否排课-0否1是');
|
|
$table->tinyInteger('is_fee')->nullable()->comment('是否缴费-0否1是');
|
|
$table->mediumText('publicize_content')->nullable()->comment('宣传内容');
|
|
$table->json('publicize_ids')->nullable()->comment('宣传附件');
|
|
$table->boolean('sign_status')->default(0)->comment('报名状态');
|
|
$table->tinyInteger('course_status')->default(0)->comment('课程状态20未开始10进行中40已结束');
|
|
$table->boolean('show_txl')->default(1)->comment('是否显示通讯录-0否1是 默认1');
|
|
$table->boolean('show_mobile')->default(1)->comment('是否显示手机号-0否1是 默认1');
|
|
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('courses');
|
|
}
|
|
};
|