<?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('battle_contracts', function (Blueprint $table) {
            $table->id();
            $table->string('creator_id');
            $table->string('creator_name');
            $table->string('party_id');
            $table->string('party_name');
            $table->string('length')->default('');
            $table->decimal('price', 20, 2)->default(0.00);
            $table->text('terms_conditions')->default('N/A');
            $table->text('stipulations')->default('N/A');
            $table->text('deliverables')->default('N/A');
            $table->enum('validity', [
                'Pending',
                'Started',
                'Finished, Paid',
                'Paid In Full',
                'Finished, Not Paid',
            ]);
            $table->timestamps();
        });
    }

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