Files
orion/app/modules/prospecting/schemas/interaction.py
Samir Boulahtit 6d6eba75bf
Some checks failed
CI / pytest (push) Failing after 48m31s
CI / docs (push) Has been skipped
CI / deploy (push) Has been skipped
CI / ruff (push) Successful in 11s
CI / validate (push) Successful in 23s
CI / dependency-scanning (push) Successful in 28s
feat(prospecting): add complete prospecting module for lead discovery and scoring
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>
2026-02-28 00:59:47 +01:00

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