products - common_codes - parts - products - files - price_histories - boms - bom_items boards - boards - board_settings - posts - board_comments - board_files - post_custom_field_values permissions - menus - roles - user_menu_permissions - role_menu_permissions tenants - tenants - plans - subscriptions - payments
31 lines
1.3 KiB
PHP
31 lines
1.3 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
public function up()
|
|
{
|
|
Schema::create('menus', function (Blueprint $table) {
|
|
$table->bigIncrements('id')->comment('PK: 메뉴 ID');
|
|
$table->unsignedBigInteger('tenant_id')->nullable()->index()->comment('FK: 테넌트 ID(null=공용메뉴)');
|
|
$table->unsignedBigInteger('parent_id')->nullable()->index()->comment('상위 메뉴 ID');
|
|
$table->string('name', 100)->comment('메뉴명');
|
|
$table->string('url', 255)->nullable()->comment('메뉴 URL');
|
|
$table->boolean('is_active')->default(true)->comment('활성여부(1=활성,0=비활성)');
|
|
$table->integer('sort_order')->default(0)->comment('정렬순서');
|
|
$table->boolean('hidden')->default(false)->comment('숨김여부');
|
|
$table->boolean('is_external')->default(false)->comment('외부링크여부');
|
|
$table->string('external_url', 255)->nullable()->comment('외부링크 URL');
|
|
$table->string('icon', 50)->nullable()->comment('아이콘명');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('menus');
|
|
}
|
|
};
|