wowowowowo
This commit is contained in:
32
database/factories/OrganisationInvitationFactory.php
Normal file
32
database/factories/OrganisationInvitationFactory.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Enums\OrganisationRole;
|
||||
use App\Models\Organisation;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\OrganisationInvitation>
|
||||
*/
|
||||
class OrganisationInvitationFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'organisation_id' => Organisation::factory(),
|
||||
'invited_by_user_id' => User::factory(),
|
||||
'email' => $this->faker->unique()->safeEmail(),
|
||||
'role' => OrganisationRole::MEMBER,
|
||||
'token' => Str::random(40),
|
||||
'expires_at' => now()->addDays(14),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user