package jnpf.enums.attendance;

import lombok.Getter;

@Getter
public enum SchedulesTypeEnum {
    NONE(0,"无出勤"),
    REST(1,"公休"),
    NORMAL(2,"正常出勤"),
    HOLIDAYS(3,"假(计薪假)"),
    PAID_HOLIDAYS(4,"假(不计薪假)"),
    NOT_IN_GROUP(5,"未来的时间不在本组"),
    LATE(6,"迟到"),
    EARLY(7,"早退"),
    MISSING(8,"缺卡"),
    ABSENCE(9,"旷工"),
    FIELD_WORK(10,"外勤"),
    LEAVE(11,"请假"),
    OVERTIME(12,"加班"),
    SECONDMENT_TO(13,"借调"),
    SECONDMENT_FROM(14,"被借调"),
    EARLY_AND_SECONDMENT(15,"当日有早退且借调情况"),
    LATE_AND_SECONDMENT(16,"当日有迟到且借调情况"),
    MISSING_AND_SECONDMENT(17,"当日有缺卡且借调情况"),
    ABSENCE_AND_SECONDMENT(18,"当日有旷工且借调情况"),
    FIELD_WORK_AND_SECONDMENT(19,"当日有打外勤且借调情况"),
    ORDINARY_HOLIDAYS(20,"假"),
    IN_CLOCK(21,"上班打卡"),
    BUSINESS_TRIP(22,"出差"),
    STEP_OUT(23,"外出"),
    ATTENDANCE_CHANGE_ABSENCE(24,"出勤变更（旷工）"),
    ATTENDANCE_CHANGE_NORMAL(25,"出勤变更（正常）"),
    REISSUE(26,"补卡");
    Integer code;
    String msg;
    SchedulesTypeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public Integer getCode() {
        return code;
    }
    public static String getMsg(Integer code) {
        for (SchedulesTypeEnum value : values()) {
            if (value.code == code) {
                return value.getMsg();
            }
        }
        return null;
    }

}
