Spaces:
Sleeping
Sleeping
Download app/models/document.py from thabsheeeeeer/DocBrain-API: direct link, hf CLI and curl.
- Browser
- Download file 616 Bytes
-
https://huggingface.co/spaces/thabsheeeeeer/DocBrain-API/resolve/f091d9bfbdf49eb397c1545e9a2eb99ae703d83e/app/models/document.py
- Command line
-
hf download hf://spaces/thabsheeeeeer/DocBrain-API@f091d9bfbdf49eb397c1545e9a2eb99ae703d83e/app/models/document.py
-
curl -L -o document.py https://huggingface.co/spaces/thabsheeeeeer/DocBrain-API/resolve/f091d9bfbdf49eb397c1545e9a2eb99ae703d83e/app/models/document.py
616 Bytes
| from sqlalchemy import Column, Integer, String, DateTime, ForeignKey, Text | |
| from datetime import datetime | |
| from app.db.database import Base | |
| class Document(Base): | |
| __tablename__ = "documents" | |
| id = Column(Integer, primary_key=True, index=True) | |
| filename = Column(String, nullable=False) | |
| file_path = Column(String, nullable=False) | |
| file_hash = Column(String, nullable=False) | |
| user_id = Column(Integer, ForeignKey("users.id"), nullable=False) | |
| status = Column(String, default="processing") | |
| error_message = Column(Text, nullable=True) | |
| created_at = Column(DateTime, default=datetime.utcnow) |