mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 08:12:17 +01:00
Added invitation delete endpoint
This commit is contained in:
committed by
Constantin Graf
parent
ad6146c483
commit
a149db655c
37
database/factories/OrganizationInvitationFactory.php
Normal file
37
database/factories/OrganizationInvitationFactory.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Enums\Role;
|
||||
use App\Models\Organization;
|
||||
use App\Models\OrganizationInvitation;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<OrganizationInvitation>
|
||||
*/
|
||||
class OrganizationInvitationFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'email' => $this->faker->unique()->safeEmail(),
|
||||
'role' => Role::Employee->value,
|
||||
'organization_id' => Organization::factory(),
|
||||
];
|
||||
}
|
||||
|
||||
public function forOrganization(Organization $organization): self
|
||||
{
|
||||
return $this->state(fn (array $attributes) => [
|
||||
'organization_id' => $organization->getKey(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user