first commit
This commit is contained in:
32
database/factories/MedicationExpenseValueFactory.php
Normal file
32
database/factories/MedicationExpenseValueFactory.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Enums\ExpenseCategory;
|
||||
use App\Enums\FundingSource;
|
||||
use App\Models\MedicationExpenseRow;
|
||||
use App\Models\MedicationExpenseValue;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<MedicationExpenseValue>
|
||||
*/
|
||||
class MedicationExpenseValueFactory extends Factory
|
||||
{
|
||||
protected $model = MedicationExpenseValue::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'medication_expense_row_id' => MedicationExpenseRow::factory(),
|
||||
'funding_source' => fake()->randomElement(FundingSource::cases()),
|
||||
'expense_category' => fake()->randomElement(ExpenseCategory::cases()),
|
||||
'amount' => fake()->randomFloat(2, 0, 100000),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user