core/orm/notification.py
Igor Lobanov b4e14cce93
added lead field to shout, new table event (#71)
* added lead field to shout, new table event

* repurposed unused notifications table
2023-08-06 22:01:40 +02:00

14 lines
482 B
Python

from datetime import datetime
from sqlalchemy import Column, String, JSON, ForeignKey, DateTime, Boolean
from base.orm import Base
class Notification(Base):
__tablename__ = "notification"
user = Column(ForeignKey("user.id"), index=True)
createdAt = Column(DateTime, nullable=False, default=datetime.now, index=True)
seen = Column(Boolean, nullable=False, default=False, index=True)
type = Column(String, nullable=False)
data = Column(JSON, nullable=True)