id(); $table->string('key')->unique()->comment('广告位KEY'); $table->string('name')->nullable()->comment('广告位名称'); $table->string('dimensions')->nullable()->comment('广告位宽高'); $table->tinyInteger('is_show')->default(0)->comment('是否显示:0不显示,1显示'); $table->timestamps(); }); Schema::create('ads', function (Blueprint $table) { $table->id(); $table->bigInteger('address_id')->default(0)->comment('广告位ID'); $table->string('image')->nullable()->comment('图片地址'); $table->integer('sort')->default(0)->comment('广告排序:逆序'); $table->tinyInteger('jump_type')->default(0)->comment('跳转类型:0不跳转,1跳转应用内页,2H5链接'); $table->string('jump_link')->nullable()->comment('跳转地址'); $table->tinyInteger('is_show')->default(0)->comment('是否显示:0不显示,1显示'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('ads'); Schema::dropIfExists('ad_addresses'); } }