Add account entity token support (balance_amount); factories + feature test
This commit is contained in:
@@ -17,7 +17,12 @@ class AccountFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
'reference' => $this->faker->uuid(),
|
||||
'description' => $this->faker->sentence(4),
|
||||
'type_id' => \App\Models\AccountType::factory(),
|
||||
'active' => 1,
|
||||
'initial_amount' => 0,
|
||||
'balance_amount' => 0,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\AccountType;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<AccountType>
|
||||
*/
|
||||
class AccountTypeFactory extends Factory
|
||||
{
|
||||
protected $model = AccountType::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->unique()->word(),
|
||||
'description' => $this->faker->sentence(3),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user