Implement dark mode, bug report page, and schema dump

This commit is contained in:
2025-11-27 15:06:45 +08:00
parent 13bc6db529
commit 83602b1ed1
91 changed files with 1078 additions and 2291 deletions

View File

@@ -0,0 +1,43 @@
<?php
namespace Database\Factories;
use App\Models\Budget;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class BudgetFactory extends Factory
{
protected $model = Budget::class;
public function definition(): array
{
$start = now()->startOfYear();
return [
'fiscal_year' => now()->year,
'name' => $this->faker->sentence(3),
'period_type' => 'annual',
'period_start' => $start,
'period_end' => $start->copy()->endOfYear(),
'status' => Budget::STATUS_DRAFT,
'created_by_user_id' => User::factory(),
'approved_by_user_id' => null,
'approved_at' => null,
'notes' => $this->faker->sentence(),
];
}
public function submitted(): static
{
return $this->state(fn () => ['status' => Budget::STATUS_SUBMITTED]);
}
public function approved(): static
{
return $this->state(fn () => [
'status' => Budget::STATUS_APPROVED,
'approved_at' => now(),
]);
}
}