Files
backend/database/migrations/2025_04_29_113252_create_calls_table.php

40 lines
1.2 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('calls', function (Blueprint $table) {
$table->id();
$table->string('telephone_id');
$table->string('caller_phone_number');
$table->foreignId('province_id')->nullable()->constrained();
$table->string('province_fa')->nullable();
$table->foreignId('operator_id')->nullable()->constrained('users');
$table->string('operator_username')->nullable();
$table->string('operator_full_name')->nullable();
$table->unsignedSmallInteger('category_id')->nullable();
$table->string('category_name')->nullable();
$table->unsignedSmallInteger('subcategory_id')->nullable();
$table->string('subcategory_name')->nullable();
$table->text('description')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('calls');
}
};