37 lines
1.0 KiB
PHP
37 lines
1.0 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('requets', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->timestamps();
|
|
$table->string('title');
|
|
$table->text('description');
|
|
$table->string('photo_path');
|
|
$table->string('detected_category');
|
|
$table->foreignId('assigned_user_id')->nullable()->constrained('users');
|
|
$table->foreignId('created_by_user_id')->constrained('users');
|
|
//$table->foreignId('category_id')->constrained('waste_categories');
|
|
$table->enum('status', ['new', 'in_progress', 'completed'])->default('new');
|
|
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('requets');
|
|
}
|
|
};
|