remove team seeders

This commit is contained in:
peaklabs-dev
2024-09-20 15:42:24 +02:00
parent 56f7eb769d
commit 000a348c90
2 changed files with 0 additions and 65 deletions

View File

@@ -1,23 +0,0 @@
<?php
namespace Database\Seeders;
use App\Models\Team;
use App\Models\User;
use Illuminate\Database\Seeder;
class TeamSeeder extends Seeder
{
public function run(): void
{
$normal_user_in_root_team = User::find(1);
$root_user_personal_team = Team::find(0);
$root_user_personal_team->description = 'The root team';
$root_user_personal_team->save();
$normal_user_in_root_team->teams()->attach($root_user_personal_team);
$normal_user_not_in_root_team = User::find(2);
$normal_user_in_root_team_personal_team = Team::find(1);
$normal_user_not_in_root_team->teams()->attach($normal_user_in_root_team_personal_team, ['role' => 'admin']);
}
}

View File

@@ -1,42 +0,0 @@
<?php
namespace Database\Seeders;
use App\Models\Team;
use App\Models\User;
use Illuminate\Database\Seeder;
class TestTeamSeeder extends Seeder
{
public function run(): void
{
// User has 2 teams, 1 personal, 1 other where it is the owner and no other members are in the team
$user = User::factory()->create([
'name' => '1 personal, 1 other team, owner, no other members',
'email' => '1@example.com',
]);
$team = Team::create([
'name' => '1@example.com',
'personal_team' => false,
'show_boarding' => true,
]);
$user->teams()->attach($team, ['role' => 'owner']);
// User has 2 teams, 1 personal, 1 other where it is the owner and 1 other member is in the team
$user = User::factory()->create([
'name' => 'owner: 1 personal, 1 other team, owner, 1 other member',
'email' => '2@example.com',
]);
$team = Team::create([
'name' => '2@example.com',
'personal_team' => false,
'show_boarding' => true,
]);
$user->teams()->attach($team, ['role' => 'owner']);
$user = User::factory()->create([
'name' => 'member: 1 personal, 1 other team, owner, 1 other member',
'email' => '3@example.com',
]);
$team->members()->attach($user, ['role' => 'member']);
}
}