-
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
1 parent
0a8c80e
commit 0957b3d
Showing
12 changed files
with
429 additions
and
92 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -44,48 +44,75 @@ async function seed(prisma: PrismaClient) { | |
where: { email: '[email protected]' }, | ||
create: { | ||
email: '[email protected]', | ||
name: 'Roland Schläfli', | ||
role: 'SUPERVISOR', | ||
}, | ||
update: { | ||
role: 'SUPERVISOR', | ||
}, | ||
update: {}, | ||
}) | ||
|
||
await prisma.proposal.upsert({ | ||
where: { id: '3ef84a3b-cff0-4350-b760-4c5bb3b3c98f' }, | ||
create: { | ||
id: '3ef84a3b-cff0-4350-b760-4c5bb3b3c98f', | ||
title: 'Student Proposal', | ||
description: 'This is a student proposal', | ||
language: 'German', | ||
plannedStartAt: new Date(), | ||
studyLevel: 'Master Thesis (30 ECTS)', | ||
topicAreas: { | ||
create: { | ||
name: 'Sustainable Finance', | ||
}, | ||
}, | ||
status: { | ||
connect: { key: ProposalStatus.OPEN }, | ||
}, | ||
type: { | ||
connect: { key: ProposalType.STUDENT }, | ||
}, | ||
ownedBy: { | ||
create: { | ||
user: { | ||
connect: { id: user.id }, | ||
}, | ||
}, | ||
}, | ||
}, | ||
update: {}, | ||
}) | ||
|
||
await prisma.proposal.upsert({ | ||
where: { id: '33a9a1b7-cad7-46e7-8b72-cfcbdbaa60d6' }, | ||
create: { | ||
id: '33a9a1b7-cad7-46e7-8b72-cfcbdbaa60d6', | ||
title: 'Supervisor Proposal', | ||
description: 'This is a supervisor proposal', | ||
language: 'English', | ||
studyLevel: 'Bachelor Thesis (18 ECTS)', | ||
topicAreas: { | ||
create: { | ||
name: 'Banking', | ||
}, | ||
}, | ||
status: { | ||
connect: { key: ProposalStatus.OPEN }, | ||
}, | ||
type: { | ||
connect: { key: ProposalType.SUPERVISOR }, | ||
}, | ||
supervisedBy: { | ||
connectOrCreate: { | ||
where: { | ||
proposalId_userId: { | ||
proposalId: '33a9a1b7-cad7-46e7-8b72-cfcbdbaa60d6', | ||
userId: user.id, | ||
}, | ||
create: { | ||
user: { | ||
connect: { id: user.id }, | ||
}, | ||
create: { | ||
user: { | ||
connect: { id: user.id }, | ||
}, | ||
}, | ||
}, | ||
ownedBy: { | ||
create: { | ||
user: { | ||
connect: { id: user.id }, | ||
}, | ||
}, | ||
}, | ||
|
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
Oops, something went wrong.