20 lines
617 B
Python
20 lines
617 B
Python
from sqlalchemy import Column, Integer, String
|
|
from sqlalchemy.orm import relationship
|
|
|
|
from database import Base
|
|
from .CustomBase import CustomBase
|
|
|
|
|
|
class Patients(Base, CustomBase):
|
|
__tablename__ = "patients"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
name = Column(String)
|
|
age = Column(Integer, nullable=True)
|
|
email = Column(String, unique=True, index=True, nullable=True)
|
|
phone = Column(String, unique=True, index=True)
|
|
address = Column(String, nullable=True)
|
|
dob = Column(String, nullable=True)
|
|
|
|
appointments = relationship("Appointments", back_populates="patient")
|