
- 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>
29 lines
634 B
Python
29 lines
634 B
Python
from typing import Optional
|
|
from pydantic import BaseModel
|
|
from datetime import datetime, date
|
|
|
|
class AttendanceBase(BaseModel):
|
|
student_id: int
|
|
class_id: int
|
|
date: date
|
|
is_present: bool = False
|
|
remarks: Optional[str] = None
|
|
|
|
class AttendanceCreate(AttendanceBase):
|
|
pass
|
|
|
|
class AttendanceUpdate(BaseModel):
|
|
is_present: Optional[bool] = None
|
|
remarks: Optional[str] = None
|
|
|
|
class AttendanceInDBBase(AttendanceBase):
|
|
id: int
|
|
marked_by: int
|
|
created_at: datetime
|
|
updated_at: Optional[datetime] = None
|
|
|
|
class Config:
|
|
orm_mode = True
|
|
|
|
class Attendance(AttendanceInDBBase):
|
|
pass |