Files
AutonetSellCar/backend/app/schemas/notification.py
AutonetSellCar Deploy 1f0dcb1ddb 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>
2025-12-30 13:24:39 +09:00

45 lines
1.0 KiB
Python

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]