middle 2
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user