Files
iptv-manager-service/app/models/schemas.py
2025-05-22 11:34:04 -05:00

26 lines
585 B
Python

from datetime import datetime
from typing import List
from uuid import UUID
from pydantic import BaseModel
class ChannelCreate(BaseModel):
"""Pydantic model for creating channels"""
urls: List[str]
name: str
group_title: str
tvg_id: str
tvg_logo: str
tvg_name: str
class ChannelUpdate(ChannelCreate):
"""Pydantic model for updating channels"""
pass
class ChannelResponse(ChannelCreate):
"""Pydantic model for channel responses"""
id: UUID
created_at: datetime
updated_at: datetime
class Config:
from_attributes = True