package com.engine.salary.enums.salaryaccounting;

import com.engine.salary.enums.BaseEnum;


public enum LockStatusEnum implements BaseEnum<Integer> {
    LOCK(1, "LOCK", 0),
    UNLOCK(0, "UNLOCK", 0);

    private Integer value;

    private String defaultLabel;

    private int labelId;


    LockStatusEnum(Integer value, String defaultLabel, int labelId) {
        this.value = value;
        this.defaultLabel = defaultLabel;
        this.labelId = labelId;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public Integer getLabelId() {
        return labelId;
    }

    @Override
    public String getDefaultLabel() {
        return defaultLabel;
    }

    public static LockStatusEnum getByValue(Integer value) {
        for (LockStatusEnum lockStatusEnum : LockStatusEnum.values()) {
            if (lockStatusEnum.getValue().equals(value)) {
                return lockStatusEnum;
            }
        }
        return UNLOCK;
    }
}
