This commit is contained in:
2025-09-09 00:15:08 +00:00
parent 0cce0322a1
commit fd34eb370f
30 changed files with 1953 additions and 35881 deletions

View File

@@ -41,7 +41,8 @@ model RegisterChannel {
model Handle {
id String @id @default(uuid())
handle String @unique
constPerView Float @default(1)
avatar String @default("")
costPerView Float @default(1)
// Relations
contents Content[]
// Many-to-many: a handle can belong to many users
@@ -58,13 +59,13 @@ model Content{
// premiumViews Int
// watchTime Int
// Relation: many contents belong to one handle
handleId String
handle Handle @relation(fields: [handleId], references: [id])
handleId String?
handle Handle? @relation(fields: [handleId], references: [id])
// Back relation: one content has many day views
dayViews contentDayView[]
dayViews ContentDayView[]
}
model contentDayView{
model ContentDayView{
id String @id @default(uuid())
contentId String
date DateTime