mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-18 12:28:46 +00:00
Remodel seeds and factories.
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
|
||||
$factory->define(Account::class, function (Faker $faker) {
|
||||
return [
|
||||
'user_id' => 1,
|
||||
'account_type_id' => 1,
|
||||
'name' => $faker->words(3, true),
|
||||
'virtual_balance' => '0',
|
||||
'active' => 1,
|
||||
'encrypted' => 0,
|
||||
'order' => 1,
|
||||
];
|
||||
});
|
||||
|
||||
$factory->state(Account::class, AccountType::ASSET, function ($faker) {
|
||||
return [
|
||||
'account_type_id' => 3,
|
||||
];
|
||||
});
|
||||
|
||||
$factory->state(Account::class, AccountType::INITIAL_BALANCE, function ($faker) {
|
||||
return [
|
||||
'account_type_id' => 6,
|
||||
];
|
||||
});
|
||||
|
||||
$factory->state(Account::class, AccountType::EXPENSE, function ($faker) {
|
||||
return [
|
||||
'account_type_id' => 4,
|
||||
];
|
||||
});
|
||||
Reference in New Issue
Block a user