32 lines
746 B
PHP
32 lines
746 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Database\Factories;
|
||
|
|
|
||
|
|
use App\Models\Tenants\Stock;
|
||
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @extends Factory<Stock>
|
||
|
|
*/
|
||
|
|
class StockFactory extends Factory
|
||
|
|
{
|
||
|
|
protected $model = Stock::class;
|
||
|
|
|
||
|
|
public function definition(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'item_code' => 'ITM-'.strtoupper(fake()->unique()->bothify('???###')),
|
||
|
|
'item_name' => fake()->word().' 부품',
|
||
|
|
'item_type' => 'raw_material',
|
||
|
|
'unit' => 'EA',
|
||
|
|
'stock_qty' => 0,
|
||
|
|
'safety_stock' => 10,
|
||
|
|
'reserved_qty' => 0,
|
||
|
|
'available_qty' => 0,
|
||
|
|
'lot_count' => 0,
|
||
|
|
'status' => 'out',
|
||
|
|
'location' => 'A-01',
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|