package jnpf.model.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 薪酬变化
 */
@Getter
@AllArgsConstructor
public enum SalaryChangeTypeEnum {

    FIRST_JOIN(0, "入职薪酬"),

    BECOME_REGULAR_WORKER(1, "转正薪酬"),

    TRANSFER_POSITION(2, "调动薪酬"),

    REPEAT_JOIN(3, "重复入职薪酬"),

    promotion(5, "调动薪酬");

    private Integer code;
    private String msg;

    public static SalaryChangeTypeEnum fromCode(Integer code) {
        for (SalaryChangeTypeEnum formFieldType : SalaryChangeTypeEnum.values()) {
            if (formFieldType.getCode().equals(code)) {
                return formFieldType;
            }
        }
        return null;
    }
}
