Files
sam-api/database/migrations/2025_07_23_144843_create_plans_table.php
hskwon 609ac39ffb feat : 테이블 및 DB 마이그레이션 파일 추가
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
2025-07-23 15:41:01 +09:00

28 lines
1019 B
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(): void {
Schema::create('plans', function (Blueprint $table) {
$table->id()->comment('PK');
$table->string('name')->comment('플랜명');
$table->string('code', 30)->unique()->comment('플랜 코드');
$table->text('description')->nullable()->comment('설명');
$table->decimal('price', 12, 2)->comment('월 요금');
$table->string('billing_cycle', 20)->default('monthly')->comment('청구 주기');
$table->json('features')->nullable()->comment('제공 기능/제한사항');
$table->boolean('is_active')->default(true)->comment('사용여부');
$table->timestamps();
$table->softDeletes();
});
}
public function down(): void {
Schema::dropIfExists('plans');
}
};