Spaces:
Runtime error
Runtime error
Download app/models/votes.py from abdullah090809/FastAPI-Project: direct link, hf CLI and curl.
- Browser
- Download file 303 Bytes
-
https://huggingface.co/spaces/abdullah090809/FastAPI-Project/resolve/bb4b25f33972753e5ff545649133e43bf2aeb752/app/models/votes.py
- Command line
-
hf download hf://spaces/abdullah090809/FastAPI-Project@bb4b25f33972753e5ff545649133e43bf2aeb752/app/models/votes.py
-
curl -L -o votes.py https://huggingface.co/spaces/abdullah090809/FastAPI-Project/resolve/bb4b25f33972753e5ff545649133e43bf2aeb752/app/models/votes.py
303 Bytes
| from sqlalchemy import Column, ForeignKey, Integer | |
| from app.database import Base | |
| class Votes(Base): | |
| __tablename__= "votes" | |
| user_id= Column(Integer,ForeignKey("users.id",ondelete="CASCADE"),primary_key=True) | |
| post_id= Column(Integer,ForeignKey("posts.id",ondelete="CASCADE"),primary_key=True) |