package com.ywt.outpatient.domain.models.enums;

public enum DatePeriodEnum {
    ALL_DAY("全天", 1),
    MORNING("上午", 2),
    AFTERNOON("下午", 3),
    NIGHT("晚上", 4);

    private final String displayName;

    private final int value;

    DatePeriodEnum(String displayName, int value) {
        this.displayName = displayName;
        this.value = value;
    }

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static DatePeriodEnum valueOf(int value) {
        for(DatePeriodEnum datePeriodEnum : DatePeriodEnum.values()){
            if(datePeriodEnum.getValue() == value){
                return datePeriodEnum;
            }
        }
        return null;
    }
}
