mein-solar: full feature set
- Schema: companyType, topics, salesScore, salesReason, offerPackage, approved, approvedAt, SearchHistory table - /api/search-history: GET (by mode) + POST (save query) - /api/ai-search: stadtwerke/industrie/custom prompts with history dedup - /api/enrich-leads: website scraping + GPT-4o-mini enrichment (fire-and-forget after each job) - /api/generate-email: personalized outreach via GPT-4o - Suche page: 3 mode tabs (Stadtwerke/Industrie/Freie Suche), Alle-Bundesländer queue button, AiSearchModal gets searchMode + history - Leadspeicher: Bewertung dots column, Paket badge column, Freigeben toggle button, email generator in SidePanel, approved-only export option - Leads API: approvedOnly + companyType filters, new fields in PATCH Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -75,6 +75,14 @@ model Lead {
|
||||
industry String?
|
||||
description String?
|
||||
|
||||
companyType String?
|
||||
topics String?
|
||||
salesScore Int?
|
||||
salesReason String?
|
||||
offerPackage String?
|
||||
approved Boolean @default(false)
|
||||
approvedAt DateTime?
|
||||
|
||||
capturedAt DateTime @default(now())
|
||||
contactedAt DateTime?
|
||||
updatedAt DateTime @updatedAt
|
||||
@@ -86,6 +94,19 @@ model Lead {
|
||||
@@index([sourceTab])
|
||||
@@index([capturedAt])
|
||||
@@index([email])
|
||||
@@index([approved])
|
||||
@@index([companyType])
|
||||
}
|
||||
|
||||
model SearchHistory {
|
||||
id String @id @default(cuid())
|
||||
query String
|
||||
region String
|
||||
searchMode String
|
||||
executedAt DateTime @default(now())
|
||||
|
||||
@@index([searchMode])
|
||||
@@index([executedAt])
|
||||
}
|
||||
|
||||
model LeadEvent {
|
||||
|
||||
Reference in New Issue
Block a user