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.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
from sqlalchemy import Column, Integer, String, Boolean, DateTime, Enum, ForeignKey, func
|
||||
from sqlalchemy.orm import relationship
|
||||
from ..database import Base
|
||||
from .channel import ContentType
|
||||
|
||||
|
||||
class CustomCategory(Base):
|
||||
__tablename__ = "custom_categories"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
name = Column(String(200), nullable=False)
|
||||
type = Column(Enum(ContentType), nullable=False)
|
||||
position = Column(Integer, default=0, nullable=False)
|
||||
is_visible = Column(Boolean, default=True, nullable=False)
|
||||
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
||||
|
||||
items = relationship("CustomCategoryItem", back_populates="category", cascade="all, delete-orphan")
|
||||
|
||||
|
||||
class CustomCategoryItem(Base):
|
||||
__tablename__ = "custom_category_items"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
custom_category_id = Column(Integer, ForeignKey("custom_categories.id"), nullable=False)
|
||||
channel_id = Column(Integer, ForeignKey("channels.id"), nullable=False)
|
||||
position = Column(Integer, default=0, nullable=False)
|
||||
|
||||
category = relationship("CustomCategory", back_populates="items")
|
||||
channel = relationship("Channel")
|
||||
Reference in New Issue
Block a user