package jnpf.model.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum StaffWorkerStatus {
    /**
     * 预入职状态
     */
    PRE_ONBOARDING("301", "预入职"),
    /**
     * 试用期状态
     */
    TRIAL("302", "试用"),
    /**
     * 正式员工状态
     */
    FULL_TIME("303", "正式"),
    /**
     * 待离职状态
     */
    PENDING_RESIGNATION("304", "待离职"),
    /**
     * 离职状态
     */
    RESIGNED("305", "离职"),

    PRE_TRIAL("306", "试岗");

    private final String code;
    private final String description;

    public static String getWorkerStatusNameByValue(String workStatus) {
        for (StaffWorkerStatus value : StaffWorkerStatus.values()) {
            if (value.getCode().equals(workStatus)) {
                return value.getDescription();
            }
        }
        return "未知工作状态";
    }
}
