CallLogBase (schemas/call.py)

Voice-Marketing-Agent · backend/src/schemas/call.py · python · MIT
database, tag:embed-classified

Defines Pydantic models for call log data, including base, create, and full record.

# Source: https://github.com/OpenVoiceX/Voice-Marketing-Agent | License: MIT | Copyright 2025 OpenVoiceX
# Provided via justclaw.it.com; keep this notice with the code.
# backend/src/schemas/call.py
from pydantic import BaseModel
from datetime import datetime

class CallLogBase(BaseModel):
    call_sid: str
    from_number: str
    full_transcript: str | None = None

class CallLogCreate(CallLogBase):
    pass

class CallLog(CallLogBase):
    id: int
    start_time: datetime
    end_time: datetime | None = None

    class Config:
        from_attributes = True # Pydantic v2 name for orm_mode

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key