- Add RestockIndex component for displaying and managing restocks. - Create RestockCardRow component for rendering individual restock items. - Implement RestockItemSubRow component for displaying detailed item information. - Define routes for restock management in web.php. - Create RestockTest to cover various scenarios for restock creation, updating, and deletion. - Ensure proper handling of permissions for restock actions. - Add validation for restock data and ensure correct relationships are maintained.
21 lines
522 B
PHP
21 lines
522 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class RestockFactory extends Factory
|
|
{
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'created_by_id' => User::factory(),
|
|
'subtotal' => fake()->numberBetween(50000, 5000000),
|
|
'total' => fake()->numberBetween(50000, 5000000),
|
|
'notes' => fake()->sentence(),
|
|
'stock_type' => fake()->randomElement(['good', 'reject']),
|
|
];
|
|
}
|
|
}
|