mirror of
https://github.com/snipe/snipe-it.git
synced 2026-04-27 02:05:36 +00:00
Fixes the Asset Factory to assign example Suppliers and Locations to Assets
This commit is contained in:
@ -38,7 +38,7 @@ class AssetFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'name' => null,
|
||||
'rtd_location_id' => Location::factory()->create(),
|
||||
'rtd_location_id' => Location::all()->random()->id,
|
||||
'serial' => $this->faker->uuid,
|
||||
'status_id' => 1,
|
||||
'user_id' => 1,
|
||||
@ -47,7 +47,7 @@ class AssetFactory extends Factory
|
||||
'purchase_date' => $this->faker->dateTimeBetween('-1 years', 'now', date_default_timezone_get()),
|
||||
'purchase_cost' => $this->faker->randomFloat(2, '299.99', '2999.99'),
|
||||
'order_number' => $this->faker->numberBetween(1000000, 50000000),
|
||||
'supplier_id' => Supplier::factory()->create(),
|
||||
'supplier_id' => Supplier::all()->random()->id,
|
||||
'requestable' => $this->faker->boolean(),
|
||||
'assigned_to' => null,
|
||||
'assigned_type' => null,
|
||||
|
||||
Reference in New Issue
Block a user