
- 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>
31 lines
673 B
Python
31 lines
673 B
Python
from typing import Optional
|
|
from pydantic import BaseModel
|
|
from datetime import datetime
|
|
|
|
class SubjectBase(BaseModel):
|
|
name: str
|
|
code: str
|
|
description: Optional[str] = None
|
|
class_id: int
|
|
teacher_id: int
|
|
|
|
class SubjectCreate(SubjectBase):
|
|
pass
|
|
|
|
class SubjectUpdate(BaseModel):
|
|
name: Optional[str] = None
|
|
code: Optional[str] = None
|
|
description: Optional[str] = None
|
|
class_id: Optional[int] = None
|
|
teacher_id: Optional[int] = None
|
|
|
|
class SubjectInDBBase(SubjectBase):
|
|
id: int
|
|
created_at: datetime
|
|
updated_at: Optional[datetime] = None
|
|
|
|
class Config:
|
|
orm_mode = True
|
|
|
|
class Subject(SubjectInDBBase):
|
|
pass |