mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Added supplier to components and consumables factories for seeding
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
45142c6888
commit
e7c6771e73
|
@ -7,6 +7,7 @@ use App\Models\Company;
|
|||
use App\Models\Component;
|
||||
use App\Models\Location;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use App\Models\Supplier;
|
||||
|
||||
class ComponentFactory extends Factory
|
||||
{
|
||||
|
@ -35,6 +36,7 @@ class ComponentFactory extends Factory
|
|||
'purchase_cost' => $this->faker->randomFloat(2),
|
||||
'min_amt' => $this->faker->numberBetween($min = 1, $max = 2),
|
||||
'company_id' => Company::factory(),
|
||||
'supplier_id' => Supplier::factory(),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ use App\Models\Consumable;
|
|||
use App\Models\Manufacturer;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use App\Models\Supplier;
|
||||
|
||||
class ConsumableFactory extends Factory
|
||||
{
|
||||
|
@ -36,6 +37,7 @@ class ConsumableFactory extends Factory
|
|||
'qty' => $this->faker->numberBetween(5, 10),
|
||||
'min_amt' => $this->faker->numberBetween($min = 1, $max = 2),
|
||||
'company_id' => Company::factory(),
|
||||
'supplier_id' => Supplier::factory(),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue