Edit File: 2024_09_01_114622_create_settlements_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateSettlementsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('settlements', function (Blueprint $table) { $table->id(); $table->enum('status',['pending','accepted','refused'])->default('pending'); $table->foreignId('provider_id')->references('id')->on('users')->onDelete('cascade'); $table->double('total_due')->default(0.0); $table->double('total_app_percentage')->default(0.0); $table->double('total_price')->default(0.0); $table->double('total_added_value')->default(0.0); $table->string('image')->nullable(); $table->text('refuse_reason')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('settlements'); } }
Back to File Manager