mirror of
https://github.com/mblanke/ThreatHunt.git
synced 2026-03-01 14:00:20 -05:00
Implement Phase 3: Advanced search, real-time notifications, and Velociraptor integration
Co-authored-by: mblanke <9078342+mblanke@users.noreply.github.com>
This commit is contained in:
34
backend/app/schemas/notification.py
Normal file
34
backend/app/schemas/notification.py
Normal file
@@ -0,0 +1,34 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class NotificationBase(BaseModel):
|
||||
"""Base notification schema"""
|
||||
title: str
|
||||
message: str
|
||||
notification_type: str
|
||||
link: Optional[str] = None
|
||||
|
||||
|
||||
class NotificationCreate(NotificationBase):
|
||||
"""Schema for creating a notification"""
|
||||
user_id: int
|
||||
tenant_id: int
|
||||
|
||||
|
||||
class NotificationRead(NotificationBase):
|
||||
"""Schema for reading notification data"""
|
||||
id: int
|
||||
user_id: int
|
||||
tenant_id: int
|
||||
is_read: bool
|
||||
created_at: datetime
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class NotificationUpdate(BaseModel):
|
||||
"""Schema for updating a notification"""
|
||||
is_read: bool
|
||||
Reference in New Issue
Block a user