- users 테이블에 role, is_active 필드 추가 - prospects 테이블 생성 (업체 정보) - demo_links 테이블 생성 (토큰 관리) - DemoSystemSeeder 추가 (Ops/Sales 계정, 샘플 데이터)
36 lines
937 B
PHP
36 lines
937 B
PHP
<?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('prospects', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignId('sales_user_id')->constrained('users')->onDelete('cascade');
|
|
$table->string('company_name', 100);
|
|
$table->string('contact_person', 100)->nullable();
|
|
$table->string('email', 100)->nullable();
|
|
$table->string('phone', 20)->nullable();
|
|
$table->text('notes')->nullable();
|
|
$table->timestamps();
|
|
|
|
$table->index('sales_user_id');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('prospects');
|
|
}
|
|
};
|