generated from fahricansecer/boilerplate-be
+55
-1
@@ -33,6 +33,8 @@ model User {
|
||||
templateUsages TemplateUsage[]
|
||||
notifications Notification[]
|
||||
preferences UserPreference?
|
||||
youtubeAnalyses YoutubeAnalysis[]
|
||||
youtubeSeoAnalyses YoutubeSeoAnalysis[]
|
||||
|
||||
// Multi-tenancy (optional)
|
||||
tenantId String?
|
||||
@@ -247,7 +249,7 @@ model Project {
|
||||
id String @id @default(uuid())
|
||||
title String @db.VarChar(200)
|
||||
description String? @db.VarChar(1000)
|
||||
prompt String @db.VarChar(2000)
|
||||
prompt String @db.Text
|
||||
|
||||
// AI Generated Script
|
||||
scriptJson Json? // Gemini API raw JSON output
|
||||
@@ -658,3 +660,55 @@ model Notification {
|
||||
@@index([isRead])
|
||||
@@index([createdAt])
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// YouTube Analysis History
|
||||
// ============================================
|
||||
|
||||
model YoutubeAnalysis {
|
||||
id String @id @default(uuid())
|
||||
videoUrl String @db.VarChar(500)
|
||||
videoId String @db.VarChar(100)
|
||||
title String? @db.VarChar(500)
|
||||
thumbnail String? @db.VarChar(500)
|
||||
viewCount String? @db.VarChar(50)
|
||||
likeCount String? @db.VarChar(50)
|
||||
commentCount Int?
|
||||
analysisData Json // Bütün Gemini analizi burada duracak
|
||||
|
||||
// Relations
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
// Timestamps
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@index([userId])
|
||||
@@index([videoId])
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// YouTube SEO Analysis History
|
||||
// ============================================
|
||||
|
||||
model YoutubeSeoAnalysis {
|
||||
id String @id @default(uuid())
|
||||
videoUrl String @db.VarChar(500)
|
||||
videoId String @db.VarChar(100)
|
||||
title String? @db.VarChar(500)
|
||||
thumbnail String? @db.VarChar(500)
|
||||
seoScore Int @default(0)
|
||||
analysisData Json // Bütün Gemini analizi (Başlık, Açıklama, Keywords, Shorts fikirleri) burada duracak
|
||||
|
||||
// Relations
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
// Timestamps
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@index([userId])
|
||||
@@index([videoId])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user