initial: bootstrap from BukidBountyApp base
This commit is contained in:
21
database/seeders/AccountSeeder.php
Normal file
21
database/seeders/AccountSeeder.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Hyperf\Database\Seeders\Seeder;
|
||||
use App\Support\AccountingTheme;
|
||||
|
||||
class AccountSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the chart of accounts from the active theme.
|
||||
*
|
||||
* Idempotent: existing accounts are matched by (theme_key, theme_account_code)
|
||||
* with a parent+name fallback for pre-theme rows. User-added accounts (theme_key
|
||||
* NULL) and user-renamed accounts are never touched.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
AccountingTheme::apply();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user