Spaces:
Sleeping
Sleeping
Download app/models/notification.py from hisham-cmd/VortexCommerceBackend: direct link, hf CLI and curl.
- Browser
- Download file 722 Bytes
-
https://huggingface.co/spaces/hisham-cmd/VortexCommerceBackend/resolve/main/app/models/notification.py
- Command line
-
hf download hf://spaces/hisham-cmd/VortexCommerceBackend/app/models/notification.py
-
curl -L -o notification.py https://huggingface.co/spaces/hisham-cmd/VortexCommerceBackend/resolve/main/app/models/notification.py
722 Bytes
| from datetime import datetime, timezone | |
| from sqlalchemy import Column, Integer, String, Text, Boolean, DateTime, JSON | |
| from app.db.base import Base | |
| class Notification(Base): | |
| __tablename__ = "notifications" | |
| id = Column(Integer, primary_key=True, autoincrement=True) | |
| type = Column(String(50), nullable=False) # checkout_shipping, checkout_payment, checkout_complete | |
| title = Column(String(255), nullable=False) | |
| message = Column(Text, nullable=True) | |
| data = Column(JSON, nullable=True) # extra context (cart total, city, etc.) | |
| is_read = Column(Boolean, default=False, nullable=False) | |
| created_at = Column(DateTime, default=lambda: datetime.now(timezone.utc), nullable=False) | |