This commit is contained in:
@@ -455,6 +455,24 @@ class AdminNotification(Base):
|
||||
)
|
||||
|
||||
|
||||
class OCRResult(Base):
|
||||
__tablename__ = "ocr_results"
|
||||
|
||||
id: Mapped[int] = mapped_column(primary_key=True)
|
||||
user_id: Mapped[int | None] = mapped_column(ForeignKey("users.id", ondelete="SET NULL"), index=True)
|
||||
vehicle_id: Mapped[int | None] = mapped_column(ForeignKey("cars.id", ondelete="SET NULL"), index=True)
|
||||
scope: Mapped[str] = mapped_column(String(80), index=True)
|
||||
filename: Mapped[str | None] = mapped_column(String(255))
|
||||
content_type: Mapped[str | None] = mapped_column(String(120))
|
||||
status: Mapped[str] = mapped_column(String(24), default="preview", server_default="preview", index=True)
|
||||
provider: Mapped[str | None] = mapped_column(String(80))
|
||||
confidence: Mapped[Decimal | None] = mapped_column(Numeric(5, 4))
|
||||
recognized_text: Mapped[str | None] = mapped_column(Text)
|
||||
candidates_json: Mapped[list | None] = mapped_column(JSON)
|
||||
error: Mapped[str | None] = mapped_column(Text)
|
||||
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now(), index=True)
|
||||
|
||||
|
||||
class ServiceWorkItem(Base):
|
||||
__tablename__ = "service_work_items"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user