I have 2 table, appointment and schedule.
schedule has these field: scheduleid, title, 'starttime', 'endtime', 'date'
appointment has these field: id, scheduleid, clinicid, 'time', 'queueNo', 'date'
schedule starttime is = appointment time. So is the date
When ever a user create a Appointment, it will also create a schedule as u can see on above. I know how to make a nested serializer but what i do not know is. If a schedule hasn't been created, what do i insert the scheduleid in the appointment table.
Reason is because, create appointment first, how to create so that in appointment django know how to create a scheduleid for it ?