From 811086de8397cda3b3f98f53ddc8f26bfc54bbeb Mon Sep 17 00:00:00 2001 From: Untone Date: Tue, 20 Feb 2024 12:04:45 +0300 Subject: [PATCH] simpler-author-model --- orm/author.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/orm/author.py b/orm/author.py index 28726627..7427e5bd 100644 --- a/orm/author.py +++ b/orm/author.py @@ -1,7 +1,6 @@ import time from sqlalchemy import JSON, Boolean, Column, ForeignKey, Integer, String -from sqlalchemy.orm import relationship from services.db import Base @@ -37,9 +36,6 @@ class Author(Base): about = Column(String, nullable=True, comment='About') # long and formatted pic = Column(String, nullable=True, comment='Picture') links = Column(JSON, nullable=True, comment='Links') - - ratings = relationship(AuthorRating, foreign_keys=AuthorRating.author, backref="author", cascade="all, delete-orphan", passive_deletes=True) - created_at = Column(Integer, nullable=False, default=lambda: int(time.time())) last_seen = Column(Integer, nullable=False, default=lambda: int(time.time())) updated_at = Column(Integer, nullable=False, default=lambda: int(time.time()))