feat: notifications system, webhook retry, issue assign endpoint, CLI milestones/notifications/overdue commands

This commit is contained in:
Zhi
2026-02-23 00:11:26 +00:00
parent 8e6aec8062
commit 0a8b18729b
3 changed files with 204 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
from sqlalchemy import Column, Integer, String, Text, DateTime, Boolean, ForeignKey
from sqlalchemy.sql import func
from sqlalchemy.orm import relationship
from app.core.config import Base
class Notification(Base):
__tablename__ = "notifications"
id = Column(Integer, primary_key=True, index=True)
user_id = Column(Integer, ForeignKey("users.id"), nullable=False)
type = Column(String(50), nullable=False) # issue.assigned, issue.mentioned, comment.added, milestone.due
title = Column(String(255), nullable=False)
message = Column(Text, nullable=True)
entity_type = Column(String(50), nullable=True) # issue, comment, milestone
entity_id = Column(Integer, nullable=True)
is_read = Column(Boolean, default=False)
created_at = Column(DateTime(timezone=True), server_default=func.now())
user = relationship("User")