def get_all_future_bookings(self): yesterday_at_midnight = datetime.combine(date.today(), time()) all_future_bookings = Booking.query( Booking.provider == self.key, Booking.datetime >= yesterday_at_midnight).order( Booking.datetime).fetch() return all_future_bookings
def get_future_confirmed_bookings(self): yesterday_at_midnight = datetime.combine(date.today(), time()) future_confirmed_bookings = Booking.query( Booking.provider == self.key, Booking.datetime >= yesterday_at_midnight, Booking.confirmed == True).order(Booking.datetime).fetch() return future_confirmed_bookings
def get_all_future_bookings(self): yesterday_at_midnight = datetime.combine(date.today(), time()) all_future_bookings = Booking.query(Booking.provider == self.key, Booking.datetime >= yesterday_at_midnight).order(Booking.datetime).fetch() return all_future_bookings
def get_future_confirmed_bookings(self): yesterday_at_midnight = datetime.combine(date.today(), time()) future_confirmed_bookings = Booking.query(Booking.provider == self.key, Booking.datetime >= yesterday_at_midnight, Booking.confirmed==True).order(Booking.datetime).fetch() return future_confirmed_bookings
def get_future_unconfirmed_bookings(self): return Booking.query(Booking.patient == self.key, Booking.datetime >= datetime.now(), Booking.confirmed == False).fetch()
def get_future_bookings(self): return Booking.query(Booking.patient == self.key, Booking.datetime >= datetime.now()).fetch()
def get_bookings(self): return Booking.query(Booking.patient == self.key).fetch()