code: def get_next_record(in_uid, kind='1'):
          '''
          Get next record by time_create.
          '''
          current_rec = MPost.get_by_uid(in_uid)
          recs = TabPost.select().where(
              (TabPost.kind == kind) &
              (TabPost.time_create < current_rec.time_create)
          ).order_by(TabPost.time_create.desc())
          if recs.count():
              return recs.get()
          return Nonf get_next_record(in_uid, kind='1'):
          '''
          Get next record by time_create.
          '''
          current_rec = MPost.get_by_uid(in_uid)
          recs = TabPost.select().where(
              (TabPost.kind == kind) &
              (TabPost.time_create < current_rec.time_create)
          ).order_by(TabPost.time_create.desc())
          if recs.count():
              return recs.get()
          return None
docs: Get next record by time_create.