mirror of
https://github.com/StepanovPlaton/torrent_backend.git
synced 2026-04-03 20:30:38 +04:00
Update database architecture. Add genres and actors
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from sqlalchemy import Column, ForeignKey, Integer, String
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from ..database import Base
|
||||
|
||||
@@ -14,7 +15,6 @@ class Audiobook(Base):
|
||||
author = Column(String)
|
||||
|
||||
torrent_file = Column(String, nullable=False)
|
||||
upload_date = Column(String, nullable=False)
|
||||
fragment = Column(String)
|
||||
update_date = Column(String, nullable=False)
|
||||
language = Column(String)
|
||||
@@ -23,4 +23,7 @@ class Audiobook(Base):
|
||||
duration = Column(String)
|
||||
reader = Column(String)
|
||||
|
||||
genres = relationship("AudiobookGenre", secondary="audiobook_to_genre",
|
||||
lazy="selectin")
|
||||
|
||||
owner_id = Column(Integer, ForeignKey("users.id"))
|
||||
|
||||
Reference in New Issue
Block a user