29 lines
702 B
PHP
29 lines
702 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\PackagingItem;
|
|
use App\Models\PackagingMaterial;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<PackagingItem>
|
|
*/
|
|
class PackagingItemFactory extends Factory
|
|
{
|
|
protected $model = PackagingItem::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'packaging_material_id' => PackagingMaterial::factory(),
|
|
'supplier_id' => null,
|
|
'name' => $this->faker->words(3, true),
|
|
'category' => 'packaging',
|
|
'weight_grams' => 0,
|
|
'min_stock_alert' => null,
|
|
'product_id' => null,
|
|
'active' => true,
|
|
];
|
|
}
|
|
}
|