simedkom/database/migrations/2025_12_12_111212_create_cooperations_table.php
Yoga Pangestu 1d52463286 feat(cooperation): refactor workflow and implement payment system
- Refactored cooperation workflow to include manual status transitions.
- Implemented payment tracking with CooperationPayment model and PayAction.
- Updated UpdateCooperationStatusCommand for automatic assignment and verification transitions.
- Removed deprecated date columns (assignment_deadline, verification_deadline).
- Enhanced Filament UI with new actions (Complete, Proceed to Payment, Pay).
- Added CooperationSeeder for testing purposes.
2026-01-14 15:41:23 +07:00

38 lines
1.1 KiB
PHP

<?php
use App\Enums\CooperationStatus;
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('cooperations', function (Blueprint $table) {
$table->id();
$table->string('title', 200);
$table->date('initial_submission_date');
$table->date('final_submission_date');
$table->text('description');
$table->unsignedInteger('payment_amount')->nullable();
$table->date('payment_date')->nullable();
$table->enum('status', [CooperationStatus::values()])->default(CooperationStatus::PENDING)->comment(CooperationStatus::comment());
$table->timestamp('created_at')->useCurrent();
$table->timestamp('updated_at')->nullable()->useCurrentOnUpdate();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cooperations');
}
};