id(); $table->char('no', 20)->comment('设备编号'); $table->char('box_no', 20)->comment('设备硬件编号'); $table->double('lat', 12, 8)->default(0.00000000)->comment('维度'); $table->double('lng', 12, 8)->default(0.00000000)->comment('经度'); $table->string('temperature')->nullable()->comment('设备温度'); $table->tinyInteger('water_level_warning')->default(0)->comment('水位警告状态'); $table->string('water_quality')->nullable()->comment('水质'); $table->timestamp('last_update_time')->nullable()->comment('最后更新的时间'); $table->integer('box_status')->default(0)->comment('设备状态'); $table->tinyInteger('a')->default(0)->comment('A路状态'); $table->tinyInteger('b')->default(0)->comment('B路状态'); $table->tinyInteger("is_use")->default(0)->comment('是否可用'); $table->tinyInteger("is_line")->default(0)->comment('是否在线'); $table->bigInteger('shop_id')->default(0); $table->bigInteger('admin_id')->default(0)->comment('归属人'); $table->tinyInteger('status')->default(1); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('devices'); } }