2 changed files with 61 additions and 0 deletions
@ -0,0 +1,31 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use Illuminate\Database\Migrations\Migration; |
||||
|
use Illuminate\Database\Schema\Blueprint; |
||||
|
use Illuminate\Support\Facades\Schema; |
||||
|
|
||||
|
return new class extends Migration |
||||
|
{ |
||||
|
/** |
||||
|
* Run the migrations. |
||||
|
*/ |
||||
|
public function up(): void |
||||
|
{ |
||||
|
Schema::create('admin_floor', function (Blueprint $table) { |
||||
|
$table->id(); |
||||
|
$table->string('name')->unique()->comment('楼层名称'); |
||||
|
$table->string('image_url')->comment('图片路径'); |
||||
|
$table->timestamps(); |
||||
|
$table->softDeletes(); |
||||
|
$table->innoDb(); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Reverse the migrations. |
||||
|
*/ |
||||
|
public function down(): void |
||||
|
{ |
||||
|
Schema::dropIfExists('admin_floor'); |
||||
|
} |
||||
|
}; |
||||
@ -0,0 +1,30 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use Illuminate\Database\Migrations\Migration; |
||||
|
use Illuminate\Database\Schema\Blueprint; |
||||
|
use Illuminate\Support\Facades\Schema; |
||||
|
|
||||
|
return new class extends Migration |
||||
|
{ |
||||
|
/** |
||||
|
* Run the migrations. |
||||
|
*/ |
||||
|
public function up(): void |
||||
|
{ |
||||
|
Schema::create('admin_floor_region', function (Blueprint $table) { |
||||
|
$table->id(); |
||||
|
$table->integer('floor_id')->comment('楼层ID'); |
||||
|
$table->string('name')->comment('区域名称'); |
||||
|
$table->timestamps(); |
||||
|
$table->innoDb(); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Reverse the migrations. |
||||
|
*/ |
||||
|
public function down(): void |
||||
|
{ |
||||
|
Schema::dropIfExists('admin_floor_region'); |
||||
|
} |
||||
|
}; |
||||
Loading…
Reference in new issue