23 lines
1.1 KiB
Python
23 lines
1.1 KiB
Python
from sqlalchemy import Column, BigInteger, Integer, String, DateTime
|
|
from sqlalchemy.dialects.postgresql import UUID as PG_UUID
|
|
import uuid
|
|
from app.infrastructure.database import Base
|
|
|
|
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)
|