| @@ -46,6 +46,7 @@ class SeedCommand extends Command | |||||
| $account = new Account(); | $account = new Account(); | ||||
| $account->setName('spawntree GmbH'); | $account->setName('spawntree GmbH'); | ||||
| $account->setSlug('spawntree'); | $account->setSlug('spawntree'); | ||||
| $account->setSuperAdminUser($user); | |||||
| $this->centralEm->persist($account); | $this->centralEm->persist($account); | ||||
| // ── Central: AccountUser (Flo als Admin) ────────────────────────────── | // ── Central: AccountUser (Flo als Admin) ────────────────────────────── | ||||
| @@ -55,6 +56,20 @@ class SeedCommand extends Command | |||||
| $accountUser->setRole(AccountUser::ROLE_ADMIN); | $accountUser->setRole(AccountUser::ROLE_ADMIN); | ||||
| $this->centralEm->persist($accountUser); | $this->centralEm->persist($accountUser); | ||||
| // ── Central: User Daniel ────────────────────────────────────────────── | |||||
| $userDaniel = new User(); | |||||
| $userDaniel->setEmail('d.knudsen@spawntree.de'); | |||||
| $userDaniel->setFirstName('Daniel'); | |||||
| $userDaniel->setLastName('Knudsen'); | |||||
| $userDaniel->setPassword($this->passwordHasher->hashPassword($userDaniel, '12spawntree345')); | |||||
| $this->centralEm->persist($userDaniel); | |||||
| $accountUserDaniel = new AccountUser(); | |||||
| $accountUserDaniel->setAccount($account); | |||||
| $accountUserDaniel->setUser($userDaniel); | |||||
| $accountUserDaniel->setRole(AccountUser::ROLE_MEMBER); | |||||
| $this->centralEm->persist($accountUserDaniel); | |||||
| $this->centralEm->flush(); | $this->centralEm->flush(); | ||||
| $io->text('✓ Central-DB: User, Account, AccountUser angelegt'); | $io->text('✓ Central-DB: User, Account, AccountUser angelegt'); | ||||
| @@ -129,6 +144,7 @@ class SeedCommand extends Command | |||||
| $account2 = new Account(); | $account2 = new Account(); | ||||
| $account2->setName('Nova-Sign'); | $account2->setName('Nova-Sign'); | ||||
| $account2->setSlug('nova-sign'); | $account2->setSlug('nova-sign'); | ||||
| $account2->setSuperAdminUser($user2); | |||||
| $this->centralEm->persist($account2); | $this->centralEm->persist($account2); | ||||
| // ── Central: AccountUser ────────────────────────────────────────────── | // ── Central: AccountUser ────────────────────────────────────────────── | ||||
| @@ -192,7 +208,7 @@ class SeedCommand extends Command | |||||
| $this->tenantEm->flush(); | $this->tenantEm->flush(); | ||||
| $io->text('✓ Tenant-DB Nova-Sign: Leistungen, Kunden, Projekte angelegt'); | $io->text('✓ Tenant-DB Nova-Sign: Leistungen, Kunden, Projekte angelegt'); | ||||
| $io->success('Seeding abgeschlossen. Login: f.eisenmenger@spawntree.de / 12spawntree345'); | |||||
| $io->success('Seeding abgeschlossen. Login: f.eisenmenger@spawntree.de / 12spawntree345 | d.knudsen@spawntree.de / 12spawntree345'); | |||||
| return Command::SUCCESS; | return Command::SUCCESS; | ||||
| } | } | ||||
| } | } | ||||