first commit
This commit is contained in:
34
database/factories/ServiceEntryFactory.php
Normal file
34
database/factories/ServiceEntryFactory.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Department;
|
||||
use App\Models\ReportPeriod;
|
||||
use App\Models\ServiceCatalog;
|
||||
use App\Models\ServiceEntry;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<ServiceEntry>
|
||||
*/
|
||||
class ServiceEntryFactory extends Factory
|
||||
{
|
||||
protected $model = ServiceEntry::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'report_period_id' => ReportPeriod::factory(),
|
||||
'service_catalog_id' => ServiceCatalog::factory(),
|
||||
'provider_department_id' => Department::factory(),
|
||||
'recipient_department_id' => Department::factory(),
|
||||
'quantity' => fake()->randomFloat(2, 0, 5000),
|
||||
'unit_price' => fake()->randomFloat(2, 10, 10000),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user