ledgerrz/database/factories/MutationFactory.php
Daan Meijer a1adf1da1c
Some checks failed
linter / quality (push) Failing after 1m3s
tests / ci (8.3) (push) Failing after 48s
tests / ci (8.4) (push) Failing after 1m5s
tests / ci (8.5) (push) Failing after 1m4s
added media, mutation events, agent instructions
2026-06-15 22:30:17 +02:00

32 lines
834 B
PHP

<?php
namespace Database\Factories;
use App\Models\Mutation;
use App\Models\Ledger;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends Factory<Mutation>
*/
class MutationFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'ledger_id' => Ledger::factory(),
'user_id' => User::factory(),
'type' => $this->faker->randomElement(['addition', 'subtraction', 'reward', 'penalty']),
'amount' => $this->faker->randomElement([5, 10, 15, -5, -10, -25]),
'description' => $this->faker->sentence(),
'status' => $this->faker->randomElement(['approved', 'pending', 'rejected']),
];
}
}