Spaces:
Sleeping
Sleeping
Download backend/app/models/notification.py from jinksQspider/SSC: direct link, hf CLI and curl.
- Browser
- Download file 692 Bytes
-
https://huggingface.co/spaces/jinksQspider/SSC/resolve/main/backend/app/models/notification.py
- Command line
-
hf download hf://spaces/jinksQspider/SSC/backend/app/models/notification.py
-
curl -L -o notification.py https://huggingface.co/spaces/jinksQspider/SSC/resolve/main/backend/app/models/notification.py
692 Bytes
| from sqlalchemy import Column, Integer, String, Text, DateTime, Boolean, ForeignKey | |
| from datetime import datetime | |
| from app.database import Base | |
| class Notification(Base): | |
| __tablename__ = "notifications" | |
| id = Column(Integer, primary_key=True, index=True) | |
| user_id = Column(Integer, ForeignKey("users.id"), nullable=False) | |
| title = Column(String(200), nullable=False) | |
| message = Column(Text, nullable=False) | |
| notification_type = Column(String(50)) # premium_expiry, achievement, new_feature | |
| is_read = Column(Boolean, default=False) | |
| created_at = Column(DateTime, default=datetime.utcnow) | |
| def __repr__(self): | |
| return f"<Notification {self.title}>" | |