package jnpf.enums.attendance;

import lombok.Getter;

/**
 * 请假类型
 * @Author 石头
 * @Date 2024/6/26 15:23
 * @Version 1.0 （版本号）
 */
@Getter
public enum LeaveTimeTypeEnum {
    MORNING(1,"上半天"),
    AFTERNOON(2,"下半天"),
    ;
    final Integer code;
    final String msg;
    public static String getByCode(Integer code) {
        LeaveTimeTypeEnum[] values = values();
        for (LeaveTimeTypeEnum value : values) {
            if (code.equals(value.code)) {
                return value.msg;
            }
        }
        return null;
    }

    LeaveTimeTypeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
