package jnpf.model.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 员工成长
 */
@Getter
@AllArgsConstructor
public enum GrowthLogEnum {
    FIRST_JOIN(0, "新入职（确认到岗）"),
    BECOME_REGULAR_WORKER(1, "转正"),
    TRANSFER_POSITION(2, "调岗"),
    REPEAT_JOIN(3, "确认到岗（重复入职 | 本次为第%n次入职）"),
    DEPART(4, "离职"),
    promotion(5, "晋升"),
    PRE_TRAIL(6, "试岗驳回"),
    ;

    private Integer code;
    private String msg;

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