final-video
This commit is contained in:
@@ -14,4 +14,39 @@ model Article {
|
||||
id Int @id @default(autoincrement())
|
||||
title String
|
||||
content String
|
||||
User User @relation(fields: [userId], references: [id])
|
||||
userId String
|
||||
}
|
||||
|
||||
model User {
|
||||
id String @id @unique
|
||||
name String
|
||||
username String @unique
|
||||
articles Article[]
|
||||
session Session[]
|
||||
Key Key[]
|
||||
|
||||
@@map("user")
|
||||
}
|
||||
|
||||
model Session {
|
||||
id String @id @unique
|
||||
user_id String
|
||||
active_expires BigInt
|
||||
idle_expires BigInt
|
||||
user User @relation(references: [id], fields: [user_id], onDelete: Cascade)
|
||||
|
||||
@@index([user_id])
|
||||
@@map("session")
|
||||
}
|
||||
|
||||
model Key {
|
||||
id String @id @unique
|
||||
hashed_password String?
|
||||
user_id String
|
||||
primary Boolean
|
||||
user User @relation(references: [id], fields: [user_id], onDelete: Cascade)
|
||||
|
||||
@@index([user_id])
|
||||
@@map("key")
|
||||
}
|
||||
|
Reference in New Issue
Block a user