Files
lead-scraper/prisma/schema.prisma
Timo Uttenweiler fa177a982f feat: Adresse & Telefon in LeadVault Tabelle + Side Panel
- Lead-Modell: address Feld hinzugefügt (Migration)
- Maps-Sync: address + phone aus source JSON extrahiert
- LeadVault Tabelle: Telefon/Adresse als kombinierte Spalte
- LeadVault Side Panel: Adresse mit Pin-Icon
- Telefonnummer ist klickbar (tel: Link)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 17:49:29 +01:00

99 lines
2.2 KiB
Plaintext

generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
}
model ApiCredential {
id String @id @default(cuid())
service String @unique
value String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Job {
id String @id @default(cuid())
type String
status String @default("pending")
config String @default("{}")
totalLeads Int @default(0)
emailsFound Int @default(0)
error String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
results LeadResult[]
}
model LeadResult {
id String @id @default(cuid())
jobId String
job Job @relation(fields: [jobId], references: [id], onDelete: Cascade)
companyName String?
domain String?
contactName String?
contactTitle String?
email String?
confidence Float?
linkedinUrl String?
source String?
createdAt DateTime @default(now())
}
model Lead {
id String @id @default(cuid())
domain String?
companyName String?
contactName String?
contactTitle String?
email String?
linkedinUrl String?
phone String?
address String?
sourceTab String
sourceTerm String?
sourceJobId String?
serpTitle String?
serpSnippet String?
serpRank Int?
serpUrl String?
emailConfidence Float?
status String @default("new")
priority String @default("normal")
notes String?
tags String?
country String?
headcount String?
industry String?
capturedAt DateTime @default(now())
contactedAt DateTime?
updatedAt DateTime @updatedAt
events LeadEvent[]
@@index([domain])
@@index([status])
@@index([sourceTab])
@@index([capturedAt])
@@index([email])
}
model LeadEvent {
id String @id @default(cuid())
leadId String
lead Lead @relation(fields: [leadId], references: [id], onDelete: Cascade)
event String
at DateTime @default(now())
@@index([leadId])
}