main
Backend Deploy 🚀 / build-and-deploy (push) Has been cancelled

This commit is contained in:
Harun CAN
2026-05-06 10:48:07 +02:00
parent 2d6f068363
commit a40619ef33
44 changed files with 4295 additions and 126 deletions
+55 -1
View File
@@ -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])
}