mirror of
https://github.com/MichaByte/OnBoard-Live.git
synced 2025-12-06 10:43:41 -05:00
working submission (oauth) flow!
This commit is contained in:
parent
25dbca5c56
commit
6afebea7e1
9 changed files with 183 additions and 45 deletions
|
|
@ -1,7 +1,7 @@
|
|||
generator client {
|
||||
provider = "prisma-client-py"
|
||||
interface = "asyncio"
|
||||
recursive_type_depth = "5"
|
||||
interface = "asyncio"
|
||||
}
|
||||
|
||||
datasource db {
|
||||
|
|
@ -10,13 +10,12 @@ datasource db {
|
|||
}
|
||||
|
||||
model User {
|
||||
id String @id @default(cuid())
|
||||
created_at DateTime @default(now())
|
||||
slack_id String @unique
|
||||
name String
|
||||
stream Stream?
|
||||
possible_pulls PullRequest[] @relation(name: "PullRequestToPossibleUser") // pull requests that this user has tried to claim via the /onboard-live-submit command on Slack
|
||||
known_pulls PullRequest[] @relation(name: "PullRequestToKnownUser") // pull requests that have been verified to belong to this user
|
||||
id String @id @default(cuid())
|
||||
created_at DateTime @default(now())
|
||||
slack_id String @unique
|
||||
name String
|
||||
pull_requests PullRequest[] @relation("PullRequestToUser")
|
||||
stream Stream?
|
||||
}
|
||||
|
||||
model Stream {
|
||||
|
|
@ -30,11 +29,9 @@ model Stream {
|
|||
}
|
||||
|
||||
model PullRequest {
|
||||
id Int @id @default(autoincrement())
|
||||
github_id Int @unique
|
||||
user User? @relation(name: "PullRequestToKnownUser", fields: [known_user_id], references: [id])
|
||||
known_user_id String?
|
||||
token String @unique @default(uuid())
|
||||
secondary_token String @unique @default(uuid())
|
||||
possible_users User[] @relation(name: "PullRequestToPossibleUser")
|
||||
id Int @id @default(autoincrement())
|
||||
github_id Int @unique
|
||||
user_id String?
|
||||
gh_user_id Int
|
||||
user User? @relation("PullRequestToUser", fields: [user_id], references: [id])
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue