ProductionOrderInstallationFactory.php 860 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. declare(strict_types=1);
  3. namespace Database\Factories;
  4. use App\Models\ProductionOrder;
  5. use App\Models\ProductionOrderInstallation;
  6. use App\Models\User;
  7. use Illuminate\Database\Eloquent\Factories\Factory;
  8. /** @extends Factory<ProductionOrderInstallation> */
  9. class ProductionOrderInstallationFactory extends Factory
  10. {
  11. protected $model = ProductionOrderInstallation::class;
  12. public function definition(): array
  13. {
  14. return [
  15. 'production_order_id' => ProductionOrder::factory(),
  16. 'installation_date' => fake()->dateTimeBetween('now', '+3 months'),
  17. 'installation_days' => fake()->numberBetween(1, 20),
  18. 'brigadier_id' => User::factory()->brigadier(),
  19. 'note' => fake()->optional()->sentence(),
  20. 'created_by' => null,
  21. 'updated_by' => null,
  22. ];
  23. }
  24. }