|
|
|
|
@ -0,0 +1,45 @@
|
|
|
|
|
<?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('course_content_evaluation_fields', function (Blueprint $table) {
|
|
|
|
|
$table->id();
|
|
|
|
|
$table->integer('course_content_id')->nullable()->comment('课程排课id');
|
|
|
|
|
// 字段名字
|
|
|
|
|
$table->string('title')->nullable()->comment('标题');
|
|
|
|
|
// 字段类型
|
|
|
|
|
$table->string('type')->nullable()->comment('字段类型。单选radio,多选checkbox,问答text,评分number,日期date,日期时间datetime');
|
|
|
|
|
// 英文标识
|
|
|
|
|
$table->string('key')->nullable()->comment('英文标识');
|
|
|
|
|
// 备注
|
|
|
|
|
$table->string('remark')->nullable()->comment('备注');
|
|
|
|
|
// 排序
|
|
|
|
|
$table->integer('sort')->nullable()->comment('排序');
|
|
|
|
|
// 选项
|
|
|
|
|
$table->string('options')->nullable()->comment('选项');
|
|
|
|
|
$table->timestamps();
|
|
|
|
|
$table->softDeletes();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Reverse the migrations.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function down()
|
|
|
|
|
{
|
|
|
|
|
Schema::dropIfExists('course_contents');
|
|
|
|
|
}
|
|
|
|
|
};
|