| # app/models/student_comment.py | |
| from datetime import datetime | |
| from sqlalchemy import ( | |
| Column, | |
| Integer, | |
| String, | |
| Text, | |
| DateTime, | |
| ForeignKey, | |
| ) | |
| from sqlalchemy.orm import relationship | |
| from core.database import Base | |
| class StudentComment(Base): | |
| __tablename__ = "student_comments" | |
| id = Column(Integer, primary_key=True, index=True) | |
| student_id = Column( | |
| Integer, | |
| ForeignKey("students.id"), | |
| nullable=False, | |
| index=True, | |
| ) | |
| coach_email = Column(String(255), nullable=False) | |
| comment = Column(Text, nullable=False) | |
| created_at = Column(DateTime, default=datetime.utcnow) | |
| # Relationship | |
| student = relationship("Student", back_populates="comments") | |