xonecas.io
4436
Sl

sesame-labs-coding-assignment / files

sesame-labs-coding-assignment / api / prisma / schema.prisma

810 bytes
1// This is your Prisma schema file,
2// learn more about it in the docs: https://pris.ly/d/prisma-schema
3
4generator client {
5  provider = "prisma-client-js"
6}
7
8datasource db {
9  provider = "sqlite" // Only because this is an exercise, otherwise PGSQL would be my goto choice.
10  url      = env("DATABASE_URL")
11}
12
13model User {
14  id             Int           @id @default(autoincrement())
15  walletAddress  String?       @unique
16  discordToken   DiscordToken? @relation(fields: [discordTokenId], references: [id])
17  discordTokenId Int?
18  verified       Boolean       @default(false)
19  coupon         String?
20}
21
22model DiscordToken {
23  id           Int    @id @default(autoincrement())
24  accessToken  String
25  expiresIn    Int
26  refreshToken String
27  scope        String
28  tokenType    String
29  user         User[]
30}