def METHOD_NAME(Pid, kind: str, major=False):
    '''
    - Pid: Participant, User or str
    - kind: `'future'`, `'past'` or `'violate'`
    - returns: objs.toJson() form or None if failed
    '''
    try:
        participant = Pid
        if not isinstance(participant, Participant):
            participant = get_participant(participant, raise_except=True)
    except Exception as e:
        return None
    present_day = datetime.now()
    seven_days_before = present_day - timedelta(7)
    appoints: QuerySet[Appoint] = participant.appoint_list.displayable()
    if major:
        appoints = appoints.filter(major_student=participant)
    if kind == 'future':
        appoints = appoints.filter(Astatus=Appoint.Status.APPOINTED,
                                   Astart__gte=present_day)
    elif kind == 'past':
        appoints = appoints.filter((Q(Astart__lte=present_day)
                                    & Q(Astart__gte=seven_days_before))
                                   | (Q(Astart__gte=present_day)
                                      & ~Q(Astatus=Appoint.Status.APPOINTED)))
    elif kind == 'today':
        appoints = appoints.filter(Astart__gte=present_day - timedelta(1),
                                   Astart__lte=present_day + timedelta(1))
    elif kind == 'violate':
        # 只考虑本学期的内容，因此用CONFIG过滤掉以前的预约
        appoints = appoints.filter(Astatus=Appoint.Status.VIOLATED,
                                   Astart__gte=CONFIG.semester_start)
    else:
        return None
    return appoints