class Folders(Base):
__tablename__ = "Folders"
type: str = Column(String)
id: int = Column(Integer, ForeignKey("Files.id"), primary_key=True)
parent_id: int = Column(String, nullable=True)
url: str = Column(String(255), nullable=True)
date = Column(TIMESTAMP, server_default=func.now(), onupdate=func.current_timestamp())
class Files(Base):
__tablename__ = "Files"
type: str = Column(String)
url: str = Column(String(255), nullable=True)
id: int = Column(Integer, nullable=False, primary_key=True)
parent_id: int = Column(Integer, ForeignKey('Folders.id'))
size: int = Column(Integer, nullable=True)
date = Column(TIMESTAMP)