28 lines
1.3 KiB
Python
28 lines
1.3 KiB
Python
from sqlalchemy import Column, BigInteger, Integer, String, DateTime, Enum as SQLEnum
|
|
from enum import Enum
|
|
from sqlalchemy.dialects.postgresql import UUID as PG_UUID
|
|
import uuid
|
|
from app.infrastructure.database import Base
|
|
from enum import Enum as PyEnum
|
|
|
|
class CallEvent(Base):
|
|
__tablename__ = "call_events"
|
|
|
|
id = Column(PG_UUID(as_uuid=True), primary_key=True, default=uuid.uuid4, index=True)
|
|
call_session_id = Column(BigInteger, nullable=False, unique=True, index=True)
|
|
direction = Column(String, nullable=False)
|
|
notification_mnemonic = Column(String, nullable=False)
|
|
last_answered_employee_full_name = Column(String, nullable=True)
|
|
employee_id = Column(Integer, nullable=True)
|
|
finish_time = Column(Integer, nullable=False)
|
|
total_time_duration = Column(Integer, nullable=False)
|
|
wait_time_duration = Column(Integer, nullable=False)
|
|
total_wait_time_duration = Column(Integer, nullable=False)
|
|
talk_time_duration = Column(Integer, nullable=False)
|
|
clean_talk_time_duration = Column(Integer, nullable=False)
|
|
full_record_file_link = Column(String, nullable=False)
|
|
tcm_topcrm_notification_name = Column(String, nullable=False)
|
|
|
|
s3_key = Column(String, nullable=True)
|
|
processing_status = Column(String, default="pending", nullable=False)
|
|
retries = Column(Integer, default=0, nullable=False) |