package com.face.global.enums;

import lombok.Getter;

public enum WeekDayEnum {
    MONDAY("1", "星期一"),
    TUESDAY("2", "星期二"),
    WEDNESDAY("3", "星期三"),
    THURSDAY("4", "星期四"),
    FRIDAY("5", "星期五"),
    SATURDAY("6", "星期六"),
    SUNDAY("0", "星期日");

    @Getter
    private String value;

    @Getter
    private String chineseName;

    WeekDayEnum(String value, String chineseName) {
        this.chineseName = chineseName;
        this.value = value;
    }

    public static WeekDayEnum getWeekDayEnumByValue(String value) {
        for (WeekDayEnum weekDayEnum : WeekDayEnum.values()) {
            if (weekDayEnum.getValue().equals(value)) {
                return weekDayEnum;
            }
        }
        return null;
    }

}
