Files
akuzakhemetov a649fb1192 Изменения:
-добавлены нетворки в докер композ
-исправлен рутинг (баг пайчарма)
-запросы к ии агентам не проходят из-за ссл сертификата (пробовали отключить, но пока не выходит, нужно доделать)
2025-12-19 00:57:13 +03:00

30 lines
663 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from sqlalchemy.orm import declarative_base
from sqlalchemy import Column, DateTime, func, String
import uuid
Base = declarative_base()
class BaseModel(Base):
"""Базовая модель с общими полями"""
__abstract__ = True
id = Column(
String,
primary_key=True,
default=lambda: str(uuid.uuid4()),
nullable=False
)
created_at = Column(
DateTime(timezone=True),
server_default=func.now(),
nullable=False
)
updated_at = Column(
DateTime(timezone=True),
server_default=func.now(),
onupdate=func.now(),
nullable=False
)