fediverse-auth/backend/prisma/schema.prisma

35 lines
792 B
Plaintext
Raw Normal View History

2024-05-20 21:36:39 -07:00
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model OidcModel {
id String @id
type Int // name of the oidc-provider model
payload Json
grantId String?
userCode String?
uid String? @unique
expiresAt DateTime?
consumedAt DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([id, type])
@@map("oidc_model")
}
model AuthSession {
id String @id @default(uuid())
one_time_code String
mode String // RECV_CODE | SEND_CODE -- is the service receiving or sending
user_sub String
}