diff --git a/database/factories/AssetFactory.php b/database/factories/AssetFactory.php index e99789bfc5..24021921b3 100644 --- a/database/factories/AssetFactory.php +++ b/database/factories/AssetFactory.php @@ -8,7 +8,6 @@ use App\Models\Category; use App\Models\Location; use App\Models\Supplier; use Illuminate\Database\Eloquent\Factories\Factory; -use App\Models\StatusLabel; /* |-------------------------------------------------------------------------- @@ -39,15 +38,16 @@ 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' => $this->faker->numberBetween(1,5), + 'status_id' => 1, 'user_id' => 1, 'asset_tag' => $this->faker->unixTime('now'), 'notes' => 'Created by DB seeder', '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::all()->random()->id, 'requestable' => $this->faker->boolean(), 'assigned_to' => null, 'assigned_type' => null,