From 91a6e199a18b67757e22b6a7996a6aee1eec9506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20L=C3=B3pez?= Date: Fri, 18 Mar 2022 13:28:12 -0700 Subject: [PATCH] Adds team members to seeder (#2208) Co-authored-by: Peer Richelsen --- packages/prisma/seed.ts | 63 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/packages/prisma/seed.ts b/packages/prisma/seed.ts index cff88cf7..32a8c3fe 100644 --- a/packages/prisma/seed.ts +++ b/packages/prisma/seed.ts @@ -334,10 +334,61 @@ async function main() { eventTypes: [], }); + const pro2UserTeam = await createUserAndEventType({ + user: { + email: "teampro2@example.com", + password: "teampro2", + username: "teampro2", + name: "Team Pro Example 2", + plan: "PRO", + }, + eventTypes: [], + }); + + const pro3UserTeam = await createUserAndEventType({ + user: { + email: "teampro3@example.com", + password: "teampro3", + username: "teampro3", + name: "Team Pro Example 3", + plan: "PRO", + }, + eventTypes: [], + }); + + const pro4UserTeam = await createUserAndEventType({ + user: { + email: "teampro4@example.com", + password: "teampro4", + username: "teampro4", + name: "Team Pro Example 4", + plan: "PRO", + }, + eventTypes: [], + }); + await createTeamAndAddUsers( { name: "Seeded Team", slug: "seeded-team", + eventTypes: { + createMany: { + data: [ + { + title: "Collective Seeded Team Event", + slug: "collective-seeded-team-event", + length: 15, + schedulingType: "COLLECTIVE", + }, + { + title: "Round Robin Seeded Team Event", + slug: "round-robin-seeded-team-event", + length: 15, + schedulingType: "ROUND_ROBIN", + }, + ], + }, + }, }, [ { @@ -348,6 +399,18 @@ async function main() { id: freeUserTeam.id, username: freeUserTeam.name || "Unknown", }, + { + id: pro2UserTeam.id, + username: pro2UserTeam.name || "Unknown", + }, + { + id: pro3UserTeam.id, + username: pro3UserTeam.name || "Unknown", + }, + { + id: pro4UserTeam.id, + username: pro4UserTeam.name || "Unknown", + }, ] ); }