mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-17 02:01:11 +10:00
fix: refactor prisma multifolder into docs example
This commit is contained in:
32
prisma/models/client.prisma
Normal file
32
prisma/models/client.prisma
Normal file
@ -0,0 +1,32 @@
|
||||
enum ClientCapabilities {
|
||||
PeerAPI @map("peerAPI") // other clients can use the HTTP API to P2P with this client
|
||||
UserStatus @map("userStatus") // this client can report this user's status (playing, online, etc etc)
|
||||
CloudSaves @map("cloudSaves") // ability to save to save slots
|
||||
}
|
||||
|
||||
// References a device
|
||||
model Client {
|
||||
id String @id @default(uuid())
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
|
||||
capabilities ClientCapabilities[]
|
||||
|
||||
name String
|
||||
platform Platform
|
||||
lastConnected DateTime
|
||||
|
||||
peerAPI ClientPeerAPIConfiguration?
|
||||
|
||||
lastAccessedSaves SaveSlot[]
|
||||
tokens APIToken[]
|
||||
}
|
||||
|
||||
model ClientPeerAPIConfiguration {
|
||||
id String @id @default(uuid())
|
||||
|
||||
clientId String @unique
|
||||
client Client @relation(fields: [clientId], references: [id])
|
||||
|
||||
endpoints String[]
|
||||
}
|
||||
Reference in New Issue
Block a user