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,38 @@
<?php
namespace Database\Factories;
use App\Models\Budget;
use App\Models\BudgetItem;
use App\Models\ChartOfAccount;
use Illuminate\Database\Eloquent\Factories\Factory;
class BudgetItemFactory extends Factory
{
protected $model = BudgetItem::class;
public function definition(): array
{
$account = ChartOfAccount::first();
if (! $account) {
$account = ChartOfAccount::create([
'account_code' => $this->faker->unique()->numerify('4###'),
'account_name_zh' => '測試費用',
'account_name_en' => 'Test Expense',
'account_type' => 'expense',
'category' => 'operating',
'is_active' => true,
'display_order' => 1,
]);
}
return [
'budget_id' => Budget::factory(),
'chart_of_account_id' => $account->id,
'budgeted_amount' => $this->faker->numberBetween(1000, 5000),
'actual_amount' => $this->faker->numberBetween(0, 4000),
'notes' => $this->faker->sentence(),
];
}
}