dstpabuaran.com/database/factories/CuttingFactory.php
Yoga Pangestu e7aa582572 feat: add cutting management functionality with CRUD operations
- Implemented CuttingIndex component for listing and managing cuttings.
- Added routes for cutting management in web.php.
- Created CuttingTest for testing cutting-related features including authorization, validation, and stock management.
- Updated roles create and edit pages to include necessary imports.
- Refactored settings and profile pages to streamline imports.
- Enhanced permissions checks for cutting management actions.
2026-08-04 02:24:11 +07:00

23 lines
603 B
PHP

<?php
namespace Database\Factories;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class CuttingFactory extends Factory
{
public function definition(): array
{
$materialCost = fake()->numberBetween(50000, 5000000);
return [
'created_by_id' => User::factory(),
'status' => fake()->randomElement(['in_progress', 'completed', 'cancelled']),
'description' => fake()->sentence(),
'total_material_cost' => $materialCost,
'cost_per_unit' => fake()->numberBetween(1000, 50000),
];
}
}