adrema/database/factories/Fileshare/Models/FileshareFactory.php

44 lines
878 B
PHP
Raw Permalink Normal View History

2024-06-27 00:00:29 +02:00
<?php
namespace Database\Factories\Fileshare\Models;
use App\Fileshare\ConnectionTypes\ConnectionType;
2024-06-27 17:41:54 +02:00
use App\Fileshare\Models\Fileshare;
2024-06-27 00:00:29 +02:00
use Illuminate\Database\Eloquent\Factories\Factory;
/**
2024-06-27 17:41:54 +02:00
* @extends Factory<Fileshare>
2024-06-27 00:00:29 +02:00
*/
2024-06-27 17:41:54 +02:00
class FileshareFactory extends Factory
2024-06-27 00:00:29 +02:00
{
/**
* The name of the factory's corresponding model.
*
2024-06-27 17:41:54 +02:00
* @var class-string<Fileshare>
2024-06-27 00:00:29 +02:00
*/
2024-06-27 17:41:54 +02:00
protected $model = Fileshare::class;
2024-06-27 00:00:29 +02:00
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition()
{
return [
'type' => '{}',
'name' => '',
];
}
public function type(ConnectionType $type): self
{
return $this->state(['type' => $type]);
}
public function name(string $name): self
{
return $this->state(['name' => $name]);
}
}