mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-15 11:42:15 +01:00
Renamed jetstream team to organization
This commit is contained in:
@@ -6,9 +6,9 @@ namespace Database\Seeders;
|
||||
|
||||
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use App\Models\Client;
|
||||
use App\Models\Organization;
|
||||
use App\Models\Project;
|
||||
use App\Models\Task;
|
||||
use App\Models\Team;
|
||||
use App\Models\TimeEntry;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Seeder;
|
||||
@@ -22,14 +22,23 @@ class DatabaseSeeder extends Seeder
|
||||
public function run(): void
|
||||
{
|
||||
$this->deleteAll();
|
||||
$organization = Team::factory()->create([
|
||||
$organization = Organization::factory()->create([
|
||||
'name' => 'ACME Corp',
|
||||
]);
|
||||
$user1 = User::factory()->withPersonalTeam()->create([
|
||||
$user1 = User::factory()->withPersonalOrganization()->create([
|
||||
'name' => 'Test User',
|
||||
'email' => 'test@example.com',
|
||||
]);
|
||||
$user1->teams()->attach($organization);
|
||||
$userAcmeAdmin = User::factory()->create([
|
||||
'name' => 'ACME Admin',
|
||||
'email' => 'admin@acme.test',
|
||||
]);
|
||||
$user1->organizations()->attach($organization, [
|
||||
'role' => 'editor',
|
||||
]);
|
||||
$userAcmeAdmin->organizations()->attach($organization, [
|
||||
'role' => 'admin',
|
||||
]);
|
||||
$client = Client::factory()->create([
|
||||
'name' => 'Big Company',
|
||||
]);
|
||||
@@ -50,6 +59,6 @@ class DatabaseSeeder extends Seeder
|
||||
DB::table((new Project())->getTable())->delete();
|
||||
DB::table((new Client())->getTable())->delete();
|
||||
DB::table((new User())->getTable())->delete();
|
||||
DB::table((new Team())->getTable())->delete();
|
||||
DB::table((new Organization())->getTable())->delete();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user