Esempio n. 1
0
class ClassAttendanceLog(db.Model):
    __tablename__ = "ClassAttendanceLog"
    id = db.Column(db.Integer, primary_key=True)
    classSchedule_id = db.Column(
        db.Integer,
        db.ForeignKey("ClassSchedule.id", ondelete="CASCADE"),
        nullable=False,
    )
    # classDate = db.Column(db.DateTime, nullable=False)
    classDate = db.Column(db.Date, nullable=False)
    attendanceCode = db.Column(db.String(2), nullable=True)
    comment = db.Column(db.Text, nullable=True)
    assignTmi = db.Column(db.Boolean, nullable=False, default=False)
    interventionLog_id = db.Column(
        db.Integer,
        db.ForeignKey("InterventionLog.id"),
        nullable=True,
    )

    def __repr__(self):
        return f"ClassAttendanceLog('{self.id}','{self.classSchedule_id}','{self.classDate}','{self.attendanceCode}','{self.assignTmi}')"
Esempio n. 2
0
class p2mtTemplates(db.Model):
    __tablename__ = "p2mtTemplates"
    id = db.Column(db.Integer, primary_key=True)
    templateTitle = db.Column(db.String(255), nullable=True)
    emailSubject = db.Column(db.String(255), nullable=True)
    templateContent = db.Column(db.Text, nullable=True)
    sendToStudent = db.Column(db.Boolean, nullable=True)
    sendToParent = db.Column(db.Boolean, nullable=True)
    sendToTeacher = db.Column(db.Boolean, nullable=True)
    intervention_id = db.Column(db.Integer,
                                db.ForeignKey("InterventionType.id"),
                                nullable=True)
    interventionLevel = db.Column(db.Integer, nullable=True)
Esempio n. 3
0
class InterventionLog(db.Model):
    __tablename__ = "InterventionLog"
    id = db.Column(db.Integer, primary_key=True)
    chattStateANumber = db.Column(
        db.String(20),
        db.ForeignKey("Student.chattStateANumber", ondelete="CASCADE"),
        nullable=False,
    )
    intervention_id = db.Column(db.Integer,
                                db.ForeignKey("InterventionType.id"),
                                nullable=False)
    interventionLevel = db.Column(db.Integer, nullable=False)
    createDate = db.Column(db.Date, nullable=False, default=datetime.utcnow)
    startDate = db.Column(db.Date, nullable=False)
    endDate = db.Column(db.Date, nullable=False)
    staffID = db.Column(db.Integer,
                        db.ForeignKey("FacultyAndStaff.id"),
                        nullable=False)
    comment = db.Column(db.Text, nullable=True)
    tmiMinutes = db.Column(db.Integer, nullable=True)
    tmiMinutesServed = db.Column(db.Integer, nullable=True)
    tmiMinutesRemaining = db.Column(db.Integer, nullable=True)
    inTmiNow = db.Column(db.Boolean, nullable=True, default=False)
    # learningLabClass_id = db.Column(db.Integer, db.ForeignKey("Classes.id"), nullable=False)
    erSession = db.Column(db.String(50), nullable=True)
    erSession = db.Column(db.String(50), nullable=True)
    interventionStatus = db.Column(db.String(50), nullable=True)
    studentNotification = db.Column(db.DateTime, nullable=True)
    parentNotification = db.Column(db.DateTime, nullable=True)
    classAttendanceLog_id = db.relationship("ClassAttendanceLog",
                                            backref="InterventionLog",
                                            lazy=True)
    classSchedule_id = db.relationship("ClassSchedule",
                                       backref="InterventionLog",
                                       passive_deletes=True,
                                       lazy=True)

    def __repr__(self):
        return f"InterventionLog('{self.id}','{self.intervention_id}','{self.startDate}','{self.endDate}')"
Esempio n. 4
0
class ClassSchedule(db.Model):
    __tablename__ = "ClassSchedule"
    id = db.Column(db.Integer, primary_key=True)
    schoolYear = db.Column(db.Integer, nullable=False)
    semester = db.Column(db.String(20), nullable=False)
    chattStateANumber = db.Column(
        db.String(20),
        db.ForeignKey("Student.chattStateANumber", ondelete="CASCADE"),
        nullable=False,
    )
    campus = db.Column(db.String(50), nullable=False)
    className = db.Column(db.String(50), nullable=False)
    teacherLastName = db.Column(db.String(50), nullable=False)
    staffID = db.Column(db.Integer,
                        db.ForeignKey("FacultyAndStaff.id"),
                        nullable=True)
    online = db.Column(db.Boolean, nullable=False, default=False)
    indStudy = db.Column(db.Boolean, nullable=False, default=False)
    classDays = db.Column(db.String(10), nullable=False)
    startTime = db.Column(db.Time, nullable=True)
    endTime = db.Column(db.Time, nullable=True)
    comment = db.Column(db.String(250), nullable=True)
    googleCalendarEventID = db.Column(db.String(250), nullable=True)
    interventionLog_id = db.Column(
        db.Integer,
        db.ForeignKey("InterventionLog.id", ondelete="CASCADE"),
        nullable=True,
    )
    learningLab = db.Column(db.Boolean, nullable=False, default=False)
    ClassAttendanceLog = db.relationship(
        "ClassAttendanceLog",
        backref="ClassSchedule",
        passive_deletes=True,
        lazy=True,
    )

    def __repr__(self):
        return f"ClassSchedule('{self.className}','{self.startTime}','{self.endTime}','{self.classDays}')"
Esempio n. 5
0
class Parents(db.Model):
    __tablename__ = "Parents"
    id = db.Column(db.Integer, primary_key=True)
    chattStateANumber = db.Column(
        db.String(20),
        db.ForeignKey("Student.chattStateANumber", ondelete="CASCADE"),
        nullable=False,
    )
    guardianship = db.Column(db.String(50), nullable=True)
    motherName = db.Column(db.String(50), nullable=True)
    motherEmail = db.Column(db.String(50), nullable=True)
    motherHomePhone = db.Column(db.String(50), nullable=True)
    motherDayPhone = db.Column(db.String(50), nullable=True)
    fatherName = db.Column(db.String(50), nullable=True)
    fatherEmail = db.Column(db.String(50), nullable=True)
    fatherHomePhone = db.Column(db.String(50), nullable=True)
    fatherDayPhone = db.Column(db.String(50), nullable=True)
    guardianEmail = db.Column(db.String(50), nullable=True)
    comment = db.Column(db.Text, nullable=True)

    def __repr__(self):
        return f"Parents('{self.chattStateANumber}','{self.guardianship}','{self.motherName}','{self.fatherName}')"