- Deleted `data-table-actions.vue` component as it is no longer needed. - Removed `CuttingResultPriceItem` type and related properties from `cutting.ts`. - Updated routes in `web.php` to eliminate stock verification routes and permissions. - Removed `StockTest.php` file and its associated tests for stock verification and management. - Adjusted `CuttingTest.php` to reflect changes in cutting results handling and removed references to product variants.
28 lines
742 B
PHP
28 lines
742 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Cutting;
|
|
use App\Models\CuttingResult;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<CuttingResult>
|
|
*/
|
|
class CuttingResultFactory extends Factory
|
|
{
|
|
public function definition(): array
|
|
{
|
|
$cuttingResult = fake()->numberBetween(10, 200);
|
|
$originalOutsideSample = fake()->numberBetween(0, (int) ($cuttingResult * 0.1));
|
|
|
|
return [
|
|
'cutting_id' => Cutting::factory(),
|
|
'product_name' => fake()->words(2, true),
|
|
'cutting_result' => $cuttingResult,
|
|
'sample' => $cuttingResult - $originalOutsideSample,
|
|
'original_outside_sample' => $originalOutsideSample,
|
|
];
|
|
}
|
|
}
|