create performance for supervisor

This commit is contained in:
2025-08-10 14:57:53 +03:30
parent e6f84b3b6f
commit 47b4f12dfd
17 changed files with 264 additions and 104 deletions

View File

@@ -5,9 +5,9 @@ namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\ExpertPerformance>
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\SupervisorPerformance>
*/
class ExpertPerformanceFactory extends Factory
class SupervisorPerformanceFactory extends Factory
{
/**
* Define the model's default state.

View File

@@ -1,27 +0,0 @@
<?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('expert_performances', function (Blueprint $table) {
$table->id();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('expert_performances');
}
};

View File

@@ -0,0 +1,34 @@
<?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('supervisor_performances', function (Blueprint $table) {
$table->id();
$table->date('date');
$table->foreignId('province_id')->constrained('provinces');
$table->string('province_name');
$table->integer('calls');
$table->integer('reviews');
$table->integer('good');
$table->integer('bad');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('supervisor_performances');
}
};

View File

@@ -5,7 +5,7 @@ namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class ExpertPerformanceSeeder extends Seeder
class SupervisorPerformanceSeeder extends Seeder
{
/**
* Run the database seeds.