- 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.
31 lines
670 B
PHP
31 lines
670 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Enums\CuttingStatus;
|
|
use App\Models\Cutting;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<Cutting>
|
|
*/
|
|
class CuttingFactory extends Factory
|
|
{
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'status' => CuttingStatus::IN_PROGRESS->value,
|
|
'description' => fake()->optional()->sentence(3),
|
|
'created_by_id' => User::factory(),
|
|
];
|
|
}
|
|
|
|
public function completed(): static
|
|
{
|
|
return $this->state(fn (array $attributes) => [
|
|
'status' => CuttingStatus::COMPLETED->value,
|
|
]);
|
|
}
|
|
}
|