refactored
Some checks failed
Deploy on push / deploy (push) Failing after 6s

This commit is contained in:
2025-08-17 17:56:31 +03:00
parent e78e12eeee
commit 9a2b792f08
98 changed files with 702 additions and 904 deletions

View File

@@ -4,19 +4,10 @@ from typing import Any
from sqlalchemy import JSON, Boolean, ForeignKey, Index, Integer, PrimaryKeyConstraint, String
from sqlalchemy.orm import Mapped, mapped_column, relationship
# Импорт Author отложен для избежания циклических импортов
from auth.orm import Author
from orm.base import BaseModel as Base
from orm.reaction import Reaction
from orm.topic import Topic
# Author уже импортирован в начале файла
def get_author_model():
"""Возвращает модель Author для использования в запросах"""
return Author
from orm.base import BaseModel
class ShoutTopic(Base):
class ShoutTopic(BaseModel):
"""
Связь между публикацией и темой.
@@ -40,7 +31,7 @@ class ShoutTopic(Base):
)
class ShoutReactionsFollower(Base):
class ShoutReactionsFollower(BaseModel):
__tablename__ = "shout_reactions_followers"
follower: Mapped[int] = mapped_column(ForeignKey("author.id"), index=True)
@@ -57,7 +48,7 @@ class ShoutReactionsFollower(Base):
)
class ShoutAuthor(Base):
class ShoutAuthor(BaseModel):
"""
Связь между публикацией и автором.
@@ -81,7 +72,7 @@ class ShoutAuthor(Base):
)
class Shout(Base):
class Shout(BaseModel):
"""
Публикация в системе.
"""