Files
KiraTV/backend/models/log.py
T
joaquin f5d6745ed0 Initial commit: KiraTV IPTV proxy server
Full-stack IPTV management system with Xtream Codes API compatibility,
multi-account provider fan-out, Jellyfin local library integration,
real-time dashboard, EPG support, and A/V-sync-safe stream recovery.
2026-05-17 23:22:05 +02:00

20 lines
905 B
Python

from sqlalchemy import Column, Integer, BigInteger, String, DateTime, func
from ..database import Base
class ConnectionLog(Base):
__tablename__ = "connection_logs"
id = Column(BigInteger, primary_key=True, index=True)
user_id = Column(Integer, nullable=False, index=True)
username = Column(String(200), nullable=False, index=True)
channel_id = Column(Integer, nullable=True)
channel_name = Column(String(500), nullable=True)
content_type = Column(String(20), nullable=True) # live, movie, series
stream_id = Column(String(100), nullable=True)
started_at = Column(DateTime(timezone=True), server_default=func.now(), index=True)
ended_at = Column(DateTime(timezone=True), nullable=True)
duration_seconds = Column(Integer, nullable=True)
bytes_transferred = Column(BigInteger, default=0, nullable=False)
client_ip = Column(String(100), nullable=True)