Automated Action 5a02fb8b1f Implement comprehensive school portal API with FastAPI
- Complete authentication system with JWT and role-based access control
- User management for Admin, Teacher, Student, and Parent roles
- Student management with CRUD operations
- Class management and assignment system
- Subject and grade tracking functionality
- Daily attendance marking and viewing
- Notification system for announcements
- SQLite database with Alembic migrations
- Comprehensive API documentation with Swagger/ReDoc
- Proper project structure with services, models, and schemas
- Environment variable configuration
- CORS support and security features

🤖 Generated with BackendIM

Co-Authored-By: BackendIM <noreply@anthropic.com>
2025-06-25 13:31:56 +00:00

30 lines
715 B
Python

from typing import Optional, List
from pydantic import BaseModel
from datetime import datetime
class NotificationBase(BaseModel):
title: str
message: str
notification_type: str
priority: str = "normal"
class NotificationCreate(NotificationBase):
recipient_ids: List[int]
class NotificationUpdate(BaseModel):
title: Optional[str] = None
message: Optional[str] = None
notification_type: Optional[str] = None
priority: Optional[str] = None
class NotificationInDBBase(NotificationBase):
id: int
sender_id: int
created_at: datetime
updated_at: Optional[datetime] = None
class Config:
orm_mode = True
class Notification(NotificationInDBBase):
pass