Some checks failed
Migrates scanning pipeline from marketing-.lu-domains app into Orion module. Supports digital (domain scan) and offline (manual capture) lead channels with enrichment, scoring, campaign management, and interaction tracking. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
45 lines
1.2 KiB
Python
45 lines
1.2 KiB
Python
# app/modules/prospecting/schemas/interaction.py
|
|
"""Pydantic schemas for prospect interactions."""
|
|
|
|
from datetime import date, datetime
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class InteractionCreate(BaseModel):
|
|
"""Schema for creating an interaction."""
|
|
|
|
interaction_type: str = Field(
|
|
..., pattern="^(note|call|email_sent|email_received|meeting|visit|sms|proposal_sent)$"
|
|
)
|
|
subject: str | None = Field(None, max_length=255)
|
|
notes: str | None = None
|
|
outcome: str | None = Field(None, pattern="^(positive|neutral|negative|no_answer)$")
|
|
next_action: str | None = Field(None, max_length=255)
|
|
next_action_date: date | None = None
|
|
|
|
|
|
class InteractionResponse(BaseModel):
|
|
"""Schema for interaction response."""
|
|
|
|
id: int
|
|
prospect_id: int
|
|
interaction_type: str
|
|
subject: str | None = None
|
|
notes: str | None = None
|
|
outcome: str | None = None
|
|
next_action: str | None = None
|
|
next_action_date: date | None = None
|
|
created_by_user_id: int
|
|
created_at: datetime
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class InteractionListResponse(BaseModel):
|
|
"""List of interactions."""
|
|
|
|
items: list[InteractionResponse]
|
|
total: int
|