32 lines
696 B
PHP
32 lines
696 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace Database\Factories;
|
||
|
|
|
||
|
|
use App\Models\Tenant;
|
||
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||
|
|
use Illuminate\Support\Str;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @extends Factory<Tenant>
|
||
|
|
*/
|
||
|
|
class TenantFactory extends Factory
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* @return array<string, mixed>
|
||
|
|
*/
|
||
|
|
public function definition(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'subdomain' => 'tenant-'.Str::lower(Str::random(8)),
|
||
|
|
'organization_name' => fake()->company(),
|
||
|
|
'contact_email' => fake()->unique()->safeEmail(),
|
||
|
|
'timezone' => 'Europe/Moscow',
|
||
|
|
'locale' => 'ru',
|
||
|
|
'is_trial' => true,
|
||
|
|
'api_key_limit' => 5,
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|