class Clerk(db.Model): """Clerk Class""" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(80), unique=False) email = db.Column(db.String(120), unique=False) def __init__(self, name, email): self.name = name self.email = email
class Doctor(db.Model): """Patient Class""" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(80), unique=True) major = db.Column(db.String(120), unique=False) email = db.Column(db.String(120), unique=True) calendar_id = db.Column(db.String(120), unique=True) def __init__(self, name, major, email, calendar_id): self.name = name self.major = major self.email = email self.calendar_id = calendar_id
class Patient(db.Model): """Doctor Class""" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(80), unique=True) phone = db.Column(db.String(80), unique=True) birthday = db.Column(db.Date, unique=False) email = db.Column(db.String(120), unique=True) def __init__(self, name, phone, birthday, email): self.name = name self.phone = phone self.birthday = birthday self.email = email
class MedicalRecord(db.Model): """Medical Record Class""" id = db.Column(db.Integer, primary_key=True) doctor_id = db.Column(db.Integer, unique=False) patient_id = db.Column(db.Integer, unique=False) date = db.Column(db.Date, unique=False) notes = db.Column(db.String(3000), unique=False) def __init__(self, doctor_id, patient_id, date, notes): self.doctor_id = doctor_id self.patient_id = patient_id self.date = date self.notes = notes
class Availability(db.Model): """Availability Class""" id = db.Column(db.Integer, primary_key=True) doctor_id = db.Column(db.Integer, unique=False) date = db.Column(db.Date, unique=False) time_start = db.Column(db.Time, unique=False) time_end = db.Column(db.Time, unique=False) event_id = db.Column(db.String(120), unique=False) def __init__(self, doctor_id, date, time_start, time_end, event_id): self.doctor_id = doctor_id self.date = date self.time_start = time_start self.time_end = time_end self.event_id = event_id