bigIncrements('id'); $table->integer('uid') ->index('uid') ->unsigned() ->comment('uid'); $table->string('username', 32) ->default('') ->comment('昵称'); $table->string('mobile', 16) ->default('') ->comment('电话'); $table->string('avatar', 255) ->default('') ->comment('头像'); $table->string('type', 16) ->default('image') ->comment('类型:image图文,video视频,html富文本'); $table->string('img', 255) ->comment('主图'); $table->string('video', 255) ->default('') ->comment('视频'); $table->string('topic_ids', 64) ->default('') ->comment('话题ids'); $table->string('title', 64) ->default('') ->comment('标题'); $table->text('content') ->nullable() ->comment('内容'); $table->string('location', 32) ->default('') ->comment('定位'); $table->tinyInteger('is_suggest') ->default(0) ->comment('是否推荐:0否,1是'); $table->tinyInteger('is_hide') ->default(0) ->comment('是否隐藏:0否,1是'); $table->softDeletes(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('post'); } }