fp/services/our/prisma/schema.prisma
CJ_Clippy bdc4894e3e
Some checks are pending
ci / build (push) Waiting to run
ci / test (push) Waiting to run
add audio analysis
2025-09-01 22:49:27 -08:00

143 lines
2.9 KiB
Plaintext

generator client {
provider = "prisma-client-js"
output = "../generated/prisma"
binaryTargets = ["native", "debian-openssl-3.0.x"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id String @id @default(uuid())
patreonId String @unique
patreonFullName String?
imageUrl String?
roles Role[]
vods Vod[]
Vtuber Vtuber[]
}
enum RoleName {
user
supporterTier1
supporterTier2
supporterTier3
supporterTier4
supporterTier5
supporterTier6
moderator
admin
}
model Role {
id String @id @default(cuid(2))
name String @unique
users User[]
}
model RateLimiterFlexible {
key String @id
points Int
expire DateTime?
}
model Stream {
id String @id @default(cuid(2))
date DateTime
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
announcementUrl String?
vods Vod[]
@@map("stream_entity")
}
enum VodStatus {
ordering
pending
approved
rejected
processing
processed
}
model Vod {
id String @id @default(cuid(2))
streamId String?
stream Stream? @relation(fields: [streamId], references: [id])
uploaderId String // previously in Upload
uploader User @relation(fields: [uploaderId], references: [id])
streamDate DateTime
notes String?
segmentKeys Json?
sourceVideo String?
sourceVideoDuration Int? // milliseconds
sourceVideoCodec String?
sourceAudioCodec String?
sourceVideoFps Float?
// audio analysis
audioIntegratedLufs Float? // Integrated loudness (LUFS-I)
audioLoudnessRange Float? // Loudness Range (LRA)
audioTruePeak Float? // True Peak (dBTP)
hlsPlaylist String?
thumbnail String?
asrVttKey String?
slvttSheetKeys Json?
slvttVTTKey String?
magnetLink String?
status VodStatus @default(pending)
sha256sum String?
cidv1 String?
funscriptVibrate String?
funscriptThrust String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
vtubers Vtuber[]
}
model Vtuber {
id String @id @default(cuid(2))
image String?
slug String? @unique
displayName String?
chaturbate String?
twitter String?
patreon String?
twitch String?
tiktok String?
onlyfans String?
youtube String?
linktree String?
carrd String?
fansly String?
pornhub String?
discord String?
reddit String?
throne String?
instagram String?
facebook String?
merch String?
description String?
themeColor String?
fanslyId String?
chaturbateId String?
twitterId String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
vods Vod[]
uploaderId String
uploader User @relation(fields: [uploaderId], references: [id])
}