id(); $table->integer('admin_id'); $table->integer('type')->default(0)->comment('课程类型'); $table->integer('category_id')->default(0)->comment('分类id'); $table->string('title')->comment('课程名'); $table->string('labels')->default('')->comment('标签'); $table->string('slug')->comment('slug'); $table->string('thumb', 500)->comment('封面'); $table->string('short_description', 500)->default('')->comment('简短介绍'); $table->text('description')->comment('课程介绍'); $table->timestamp('published_at')->default(null)->nullable(true)->comment('上线时间'); $table->tinyInteger('is_rec')->default(0)->comment('推荐,0否,1是'); $table->integer('user_count')->default(0)->comment('学习人数'); $table->tinyInteger('comment_status')->default(0)->comment('0关闭评论,1开启评论'); $table->tinyInteger('status')->default(1)->comment('1显示,0隐藏'); $table->softDeletes(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('courses'); } }