bigIncrements('id'); $table->integer('post_id') ->index('post_id') ->comment('帖子id'); $table->integer('parent_id') ->default(0) ->comment('评论id'); $table->integer('uid') ->index('uid') ->unsigned() ->comment('uid'); $table->string('username', 32) ->default('') ->comment('昵称'); $table->string('avatar', 255) ->default('') ->comment('头像'); $table->string('content', 200) ->default('') ->comment('评论内容'); $table->integer('praise_count') ->default(0) ->comment('点赞数'); $table->tinyInteger('is_delete') ->default(0) ->comment('是否删除:0否,1是'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('post_comment'); } }