我使用了 mysql 数据库, python2.7 , django rest框架
class Appointment(models.Model):
patient = models.ForeignKey(Patient,on_delete=models.SET_NULL, null=True,blank=True)
doctor = models.ForeignKey(Doctors)
standardchoices = models.ForeignKey(Choices)
slotchoices = models.TextField(null=True, blank=True)
# department=models.ForeignKey(Departments)
# approvedby=models.ForeignKey(Staff, default=None)
bookingdate = models.DateField(null=True)
bookingtime = models.TimeField(null=True)
# statusofappointment=models.PositiveSmallIntegerField(choices=types)