Fix bugs, convert thumbnail to png, add context menu
This commit is contained in:
parent
c545d4b17d
commit
eb8a302222
37 changed files with 1916 additions and 137 deletions
|
|
@ -38,6 +38,18 @@ class Document(Base):
|
|||
updated_at: Mapped[str] = mapped_column(Text, default=_now_iso, onupdate=_now_iso)
|
||||
deleted_at: Mapped[str | None] = mapped_column(Text, nullable=True, default=None)
|
||||
|
||||
@property
|
||||
def in_trash(self) -> bool:
|
||||
return self.deleted_at is not None
|
||||
|
||||
@property
|
||||
def filename(self) -> str:
|
||||
return self.original_filename
|
||||
|
||||
@property
|
||||
def mime_type(self) -> str:
|
||||
return "application/pdf"
|
||||
|
||||
# Relationships
|
||||
annotation_state: Mapped["AnnotationState"] = relationship(
|
||||
"AnnotationState",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue