@@ -5,6 +5,7 @@ namespace Database\Factories;
|
||||
use App\Models\Organization;
|
||||
use App\Models\User;
|
||||
use App\OrganizationRole;
|
||||
use App\WorkspaceType;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
@@ -21,6 +22,7 @@ class OrganizationFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'name' => fake()->unique()->company(),
|
||||
'type' => WorkspaceType::Organization,
|
||||
'personal_workspace' => false,
|
||||
'lifetime_access' => false,
|
||||
];
|
||||
@@ -32,10 +34,22 @@ class OrganizationFactory extends Factory
|
||||
public function personal(): static
|
||||
{
|
||||
return $this->state(fn (array $attributes) => [
|
||||
'type' => WorkspaceType::Personal,
|
||||
'personal_workspace' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the organization is a shared family workspace.
|
||||
*/
|
||||
public function family(): static
|
||||
{
|
||||
return $this->state(fn (array $attributes) => [
|
||||
'type' => WorkspaceType::Family,
|
||||
'personal_workspace' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Give the organization perpetual access, as granted to accounts that
|
||||
* predate subscriptions.
|
||||
|
||||
Reference in New Issue
Block a user