Initial commit: AutonetSellCar platform with deployment system
- Frontend: Next.js 14 with TypeScript - Backend: FastAPI with SQLAlchemy - Agent: Carmodoo sync agent - Deployment: Docker Compose based staging/production setup - Scripts: Automated deployment with rollback support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
44
backend/app/schemas/notification.py
Normal file
44
backend/app/schemas/notification.py
Normal file
@@ -0,0 +1,44 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional, List
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class NotificationCreate(BaseModel):
|
||||
"""Create notification schema"""
|
||||
user_id: int
|
||||
notification_type: str
|
||||
title: str
|
||||
message: str
|
||||
link: Optional[str] = None
|
||||
related_id: Optional[int] = None
|
||||
related_type: Optional[str] = None
|
||||
|
||||
|
||||
class NotificationResponse(BaseModel):
|
||||
"""Notification response schema"""
|
||||
id: int
|
||||
user_id: int
|
||||
notification_type: str
|
||||
title: str
|
||||
message: str
|
||||
link: Optional[str] = None
|
||||
related_id: Optional[int] = None
|
||||
related_type: Optional[str] = None
|
||||
is_read: bool
|
||||
read_at: Optional[datetime] = None
|
||||
created_at: datetime
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class NotificationListResponse(BaseModel):
|
||||
"""Notification list with unread count"""
|
||||
notifications: List[NotificationResponse]
|
||||
unread_count: int
|
||||
total: int
|
||||
|
||||
|
||||
class NotificationMarkRead(BaseModel):
|
||||
"""Mark notifications as read"""
|
||||
notification_ids: List[int]
|
||||
Reference in New Issue
Block a user