-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
64 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
import { prisma } from '@/db'; | ||
import { PrismaClient } from '@prisma/client'; | ||
|
||
const prisma = new PrismaClient(); | ||
|
||
const workshopLocations = [ | ||
{ name: 'Dubai' }, | ||
{ name: 'Singapore' }, | ||
{ name: 'Convention Organizer' }, | ||
{ name: 'Buenos Aires' }, | ||
]; | ||
|
||
const users = [ | ||
|
@@ -12,30 +15,30 @@ const users = [ | |
is_delegate: false, | ||
is_alternate: false, | ||
workshop_id: BigInt(3), | ||
name: 'Billy Bob', | ||
name: 'Billy Bob Organizer', | ||
email: '[email protected]', | ||
wallet_address: | ||
'stake_test3hjbd6o28bup465uqw3ziahm7satj4507tyterkkw91bz7hdwjfro', | ||
'stake_test1uzmx7hxevy7r63an2v968x4kw5cxdkjw0zwgxe0ph74ad3s7zmcxx', | ||
}, | ||
{ | ||
is_convention_organizer: false, | ||
is_delegate: true, | ||
is_alternate: false, | ||
workshop_id: BigInt(1), | ||
name: 'James Jones', | ||
name: 'James Jones delegate', | ||
email: '[email protected]', | ||
wallet_address: | ||
'stake_test4ilce7p39cvq576vrx4ajbin8ubuk5618uzvftllx02ca8iexksg', | ||
'stake_test1ur582xvym2mv8qj7xfny5vsm5gn8yxam7er43xu779vh0cq4tpyxh', | ||
}, | ||
{ | ||
is_convention_organizer: false, | ||
is_delegate: false, | ||
is_alternate: true, | ||
workshop_id: BigInt(2), | ||
name: 'Sally Sue', | ||
name: 'Sally Sue alternate', | ||
email: '[email protected]', | ||
wallet_address: | ||
'stake_test5jkdf8p40dxr687wsx5bkcoj9vcvl6729vawguomm13db9jfylhtp', | ||
'stake_test1uqgf7pecctde8ygq25w48k8qrzzr6ap9d5nfwp8436a9g8sdmnp2k', | ||
}, | ||
{ | ||
is_convention_organizer: false, | ||
|
@@ -45,24 +48,70 @@ const users = [ | |
name: 'John Doe', | ||
email: '[email protected]', | ||
wallet_address: | ||
'stake_test5jkdf8p40dxr687wsx5bkcoj9vcvl6729vawguomm13db9jfueijd', | ||
'stake_test1uzryp0nzykrdmnxuu8nsu9q2vz2a22l9upq4ckn4p5uqhjgvkdd6g', | ||
}, | ||
{ | ||
is_convention_organizer: false, | ||
is_delegate: false, | ||
is_alternate: true, | ||
workshop_id: BigInt(1), | ||
name: 'Roy James', | ||
email: '[email protected]', | ||
wallet_address: | ||
'stake_test1uq2c7pdk3nr0mtsl9z47redcc38pvchz5czryeh643ecvpgu5v0gr', | ||
}, | ||
{ | ||
is_convention_organizer: true, | ||
is_delegate: false, | ||
is_alternate: false, | ||
workshop_id: BigInt(3), | ||
name: 'Test organizer', | ||
email: '[email protected]', | ||
wallet_address: | ||
'stake_test1urrfysygca8m9x0qypxrutl5j2n9c252mev4qmwdtzwqr6g6dj7kn', | ||
}, | ||
{ | ||
is_convention_organizer: false, | ||
is_delegate: false, | ||
is_alternate: true, | ||
workshop_id: BigInt(4), | ||
name: 'Test alternate', | ||
email: '[email protected]', | ||
wallet_address: | ||
'stake_test1up646zdqul0wud00ss0vszpf9g22uqc0r4k4tv7gtv8edqs5nrfs7', | ||
}, | ||
{ | ||
is_convention_organizer: false, | ||
is_delegate: true, | ||
is_alternate: false, | ||
workshop_id: BigInt(4), | ||
name: 'Test delegate', | ||
email: '[email protected]', | ||
wallet_address: | ||
'stake_test1upzv3vmy37a0zk743vjfaexrxvnnv7fyhrdg5ncla6dknksjfxrpy', | ||
}, | ||
]; | ||
|
||
const workshopInfo = [ | ||
{ | ||
name: 'Dubai', | ||
delegate_id: BigInt(1), | ||
alternate_id: BigInt(2), | ||
active_vote_id: BigInt(1), | ||
delegate_id: BigInt(2), | ||
alternate_id: BigInt(5), | ||
active_vote_id: BigInt(2), | ||
}, | ||
{ | ||
name: 'Singapore', | ||
delegate_id: BigInt(3), | ||
alternate_id: BigInt(4), | ||
active_vote_id: BigInt(4), | ||
delegate_id: BigInt(4), | ||
alternate_id: BigInt(3), | ||
active_vote_id: BigInt(3), | ||
}, | ||
{ name: 'Convention Organizer' }, | ||
{ | ||
name: 'Buenos Aires', | ||
delegate_id: BigInt(8), | ||
alternate_id: BigInt(7), | ||
active_vote_id: BigInt(8), | ||
}, | ||
]; | ||
|
||
const seedDB = async (): Promise<void> => { | ||
|