<?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('country_calls_reports', function (Blueprint $table) {
            $table->id();
            $table->foreignId('province_id')->constrained('provinces');
            $table->string('province_name');
            $table->date('date');
            $table->integer('total');
            $table->integer('route_to_teh4');
            $table->integer('route_to_teh5');
            $table->integer('route_to_os4');
            $table->integer('route_to_os5');
            $table->integer('answered');
            $table->integer('answered_over10');
            $table->integer('missed');
            $table->integer('dnd');
            $table->integer('transferred');
            $table->integer('talked_to_operator');
            $table->float('average_calls_time');
            $table->integer('fails');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('country_calls_reports');
    }
};
