mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
seed Bob der Baumeister
This commit is contained in:
parent
a6f36cd305
commit
ac0c0c8449
@ -8,6 +8,7 @@ import { useSeeding, runSeeder } from 'typeorm-seeding'
|
|||||||
import { CreatePeterLustigSeed } from './seeds/users/peter-lustig.admin.seed'
|
import { CreatePeterLustigSeed } from './seeds/users/peter-lustig.admin.seed'
|
||||||
import { CreateBibiBloxbergSeed } from './seeds/users/bibi-bloxberg.seed'
|
import { CreateBibiBloxbergSeed } from './seeds/users/bibi-bloxberg.seed'
|
||||||
import { CreateRaeuberHotzenplotzSeed } from './seeds/users/raeuber-hotzenplotz.seed'
|
import { CreateRaeuberHotzenplotzSeed } from './seeds/users/raeuber-hotzenplotz.seed'
|
||||||
|
import { CreateBobBaumeisterSeed } from './seeds/users/bob-baumeister.seed'
|
||||||
|
|
||||||
const run = async (command: string) => {
|
const run = async (command: string) => {
|
||||||
// Database actions not supported by our migration library
|
// Database actions not supported by our migration library
|
||||||
@ -61,6 +62,7 @@ const run = async (command: string) => {
|
|||||||
await runSeeder(CreatePeterLustigSeed)
|
await runSeeder(CreatePeterLustigSeed)
|
||||||
await runSeeder(CreateBibiBloxbergSeed)
|
await runSeeder(CreateBibiBloxbergSeed)
|
||||||
await runSeeder(CreateRaeuberHotzenplotzSeed)
|
await runSeeder(CreateRaeuberHotzenplotzSeed)
|
||||||
|
await runSeeder(CreateBobBaumeisterSeed)
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unsupported command ${command}`)
|
throw new Error(`Unsupported command ${command}`)
|
||||||
|
|||||||
9
database/src/seeds/users/bob-baumeister.seed.ts
Normal file
9
database/src/seeds/users/bob-baumeister.seed.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { Factory, Seeder } from 'typeorm-seeding'
|
||||||
|
import { bobBaumeister } from './bob-baumeister'
|
||||||
|
import { userSeeder } from '../helpers/user-helpers'
|
||||||
|
|
||||||
|
export class CreateBobBaumeisterSeed implements Seeder {
|
||||||
|
public async run(factory: Factory): Promise<void> {
|
||||||
|
await userSeeder(factory, bobBaumeister)
|
||||||
|
}
|
||||||
|
}
|
||||||
25
database/src/seeds/users/bob-baumeister.ts
Normal file
25
database/src/seeds/users/bob-baumeister.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
export const bobBaumeister = {
|
||||||
|
email: 'bob@baumeister.de',
|
||||||
|
firstName: 'Bob',
|
||||||
|
lastName: 'der Baumeister',
|
||||||
|
username: 'bob',
|
||||||
|
description: 'Können wir das schaffen? Ja, wir schaffen das!',
|
||||||
|
password: BigInt('3296644341468822636'),
|
||||||
|
pubKey: Buffer.from('a509d9a146374fc975e3677db801ae8a4a83bff9dea96da64053ff6de6b2dd7e', 'hex'),
|
||||||
|
privKey: Buffer.from(
|
||||||
|
'd30606ac59c29058896180bebd6dcd1714dbdd697cc14b65eb4de9ef5241a5d5fc789eaab48957a887c45b7e71ab75c47fd132c14b99007891b5bdfb1026575009f0802b0126930803c113ab3f44e1be',
|
||||||
|
'hex',
|
||||||
|
),
|
||||||
|
emailHash: Buffer.from('4b8ce4e175587aaf33da19e272719da1a547daff557820191fab0c65c5a3b7f1', 'hex'),
|
||||||
|
createdAt: new Date('2021-11-26T11:36:31'),
|
||||||
|
emailChecked: true,
|
||||||
|
passphraseShown: false,
|
||||||
|
language: 'de',
|
||||||
|
disabled: false,
|
||||||
|
groupId: 1,
|
||||||
|
publisherId: null,
|
||||||
|
passphrase:
|
||||||
|
'detail master source effort unable waste tilt flush domain orchard art truck hint barrel response gate impose peanut secret merry three uncle wink resource ',
|
||||||
|
mnemonicType: 2,
|
||||||
|
isAdmin: false,
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user