Spaces:
Runtime error
Runtime error
| from datetime import datetime | |
| from sqlalchemy import ( | |
| String, | |
| ) | |
| from sqlalchemy.orm import Mapped, relationship, mapped_column | |
| from components.dbo.models.base import Base | |
| class Document(Base): | |
| """ | |
| Сущность, которая хранит основную информацию о документе. | |
| """ | |
| __tablename__ = "document" | |
| filename: Mapped[str] = mapped_column(String) | |
| source_format: Mapped[str] = mapped_column(String) | |
| title: Mapped[str] = mapped_column(String) | |
| status: Mapped[str] = mapped_column(String) | |
| owner: Mapped[str] = mapped_column(String) | |
| datasets: Mapped[list["DatasetDocument"]] = relationship( | |
| 'DatasetDocument', back_populates='document' | |
| ) | |
| acronyms = relationship("Acronym", back_populates="document") | |