comment('图书表'); $table->increments('id'); $table->string('title')->comment('书名'); // 书架 $table->string('bookshelf')->comment('书架'); $table->string('author')->nullable()->comment('作者'); $table->string('isbn')->nullable()->comment('ISBN'); $table->string('publisher')->nullable()->comment('出版社'); $table->string('publish_year')->nullable()->comment('出版年份'); $table->string('category')->nullable()->comment('分类'); $table->mediumText('description')->nullable()->comment('图书简介'); $table->integer('cover_id')->nullable()->comment('图书封面'); $table->tinyInteger('status')->default(0)->comment('状态0可借阅1已借出2维护中'); $table->json('other_data')->nullable()->comment('其他数据'); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('books'); } };