package com.eitc.patient.enums;

import java.util.ArrayList;
import java.util.List;

/**
 * PatientAppointmentAppointmentStatusEnum
 *
 * @author mtx
 * @date: 2024/05/20 17:06
 */
public enum PatientAppointmentStatusEnum {

    // 预约状态（1预约，2已确定，3已到店，4治疗中，5治疗完成，6已结账，7已离开，8已失约）
    RESERVATION(1, "预约"),
//    CONFIRMED(2, "已确定"),
    ARRIVED_AT_STORE(3, "已到店"),
    IN_TREATMENT(4, "治疗中"),
    TREATMENT_COMPLETED(5, "治疗完成"),
    CLOSED(6, "已结账"),
//    LEAVING(7, "已离开"),
    HAS_BROKEN_THE_PROMISE(8, "已失约");

    private final Integer code;
    private final String info;

    PatientAppointmentStatusEnum(Integer code, String info) {
        this.code = code;
        this.info = info;
    }

    public Integer getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }

    public static List<Integer> getCodes() {
        PatientAppointmentStatusEnum[] values = PatientAppointmentStatusEnum.values();
        List<Integer> list = new ArrayList<>();
        for (PatientAppointmentStatusEnum value : values) {
            list.add(value.getCode());
        }
        return list;
    }

    public static List<String> getInfos() {
        PatientAppointmentStatusEnum[] values = PatientAppointmentStatusEnum.values();
        List<String> list = new ArrayList<>();
        for (PatientAppointmentStatusEnum value : values) {
            list.add(value.getInfo());
        }
        return list;
    }


}
