mirror of
https://github.com/MichaByte/OnBoard-Live.git
synced 2025-12-06 10:43:41 -05:00
50% done with submission flow i think
This commit is contained in:
parent
f57c38250a
commit
25dbca5c56
7 changed files with 218 additions and 44 deletions
|
|
@ -10,11 +10,13 @@ datasource db {
|
|||
}
|
||||
|
||||
model User {
|
||||
id String @id @default(cuid())
|
||||
created_at DateTime @default(now())
|
||||
slack_id String @unique
|
||||
name String
|
||||
stream Stream?
|
||||
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
|
||||
}
|
||||
|
||||
model Stream {
|
||||
|
|
@ -26,3 +28,13 @@ model Stream {
|
|||
user_id String @unique
|
||||
user User @relation(fields: [user_id], references: [id])
|
||||
}
|
||||
|
||||
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")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue