sendou.ink/prisma/seed.ts
2020-10-13 19:07:22 +03:00

37 lines
855 B
TypeScript

import { PrismaClient } from "@prisma/client"
const prisma = new PrismaClient()
const main = async () => {
await prisma.user.create({
data: {
username: "N-ZAP",
discriminator: "6227",
discordId: "455039198672453645",
discordAvatar: "f809176af93132c3db5f0a5019e96339",
profile: {
create: {
bio: "My cool bio! Supports markdown too: **bolded**",
country: "US",
customUrlPath: "tester",
sensMotion: 45,
sensStick: -20,
weaponPool: ["Tenta Brella", "Range Blaster", "Luna Blaster", "N-ZAP '89"],
twitchName: "nintendo",
youtubeId: "UCAtobAxsQcACwDZCSH9uJfA"
}
}
}
})
console.log("User created")
}
main()
.catch(e => console.error(e))
.finally(async () => {
await prisma.$disconnect()
})
export { }