class Doctor(db.Model): __tablename__ = 'Doctor' __table_args__ = {'extend_existing': True} DoctorID = db.Column(db.Integer, primary_key=True) DoctorName = db.Column(db.String(50)) email = db.Column(db.String(50), primary_key=True) password_ = db.Column(db.String(15))
class Doctor(db.Model, UserMixin): __tablename__ = 'Doctor' DoctorID = db.Column(db.Integer, primary_key=True) DoctorName = db.Column(db.String(50)) email = db.Column(db.String(50), nullable=False) password_ = db.Column(db.String(15)) def get_id(self): try: return self.DoctorID except AttributeError: raise NotImplementedError('No `id` attribute - override `get_id`')
class Circles(db.Model): TestID = db.Column(db.Integer, db.ForeignKey('testframe.TestID'), primary_key=True) CircleID = db.Column(db.Integer, primary_key=True) symbol = db.Column(db.String(1)) begin_circle = db.Column(db.Float) end_circle = db.Column(db.Float) total_time = db.Column(db.Float)
class Answers(db.Model): TestID = db.Column(db.Integer, db.ForeignKey('testframe.TestID'), primary_key=True) QuestionID = db.Column(db.Integer, db.ForeignKey('questions.QuestionID'), primary_key=True) Answer = db.Column(db.String(250))
class TestFrame(db.Model): __tablename__ = "testframe" TestID = db.Column(db.Integer, primary_key=True) PatientID = db.Column(db.Integer, primary_key=True) DoctorID = db.Column(db.Integer, db.ForeignKey('Doctor.DoctorID'), nullable=False, primary_key=True) DateTaken = db.Column(db.DateTime) TestName = db.Column(db.String(50), db.ForeignKey('json_files.name')) TestLength = db.Column(db.Time)
class JSONFiles(db.Model): name = db.Column(db.String(50), primary_key=True) data = db.Column(db.LargeBinary)