43 lines
1.5 KiB
PHP
43 lines
1.5 KiB
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('interviews', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('candidate_name');
|
|
$table->string('candidate_email');
|
|
$table->string('candidate_phone');
|
|
$table->string('temp_password');
|
|
$table->timestamp('expires_at');
|
|
$table->string('language')->default('python'); // python, c, cpp, java, php, javascript
|
|
$table->string('status')->default('scheduled'); // scheduled, in_progress, completed, expired
|
|
$table->json('assigned_interviewers')->nullable();
|
|
$table->json('proctor_logs')->nullable();
|
|
$table->longText('submitted_code')->nullable();
|
|
$table->string('submitted_language')->nullable();
|
|
$table->longText('code_output')->nullable();
|
|
$table->string('recording_path')->nullable();
|
|
$table->string('submission_unique_id')->unique();
|
|
$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('interviews');
|
|
}
|
|
};
|