- Update API: events, users, policies, routes, resources, migrations - Remove deprecated models/resources (customers, setlists, invitations, etc.) - Refresh admin app and docs; remove apps/band Made-with: Cursor
31 lines
812 B
PHP
31 lines
812 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Organisation;
|
|
use App\Models\User;
|
|
use App\Models\UserInvitation;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Str;
|
|
|
|
/** @extends Factory<UserInvitation> */
|
|
final class UserInvitationFactory extends Factory
|
|
{
|
|
/** @return array<string, mixed> */
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'email' => fake()->unique()->safeEmail(),
|
|
'invited_by_user_id' => User::factory(),
|
|
'organisation_id' => Organisation::factory(),
|
|
'event_id' => null,
|
|
'role' => 'org_member',
|
|
'token' => strtolower((string) Str::ulid()),
|
|
'status' => 'pending',
|
|
'expires_at' => now()->addDays(7),
|
|
];
|
|
}
|
|
}
|