package cn.ey.biz.module.system.enums.user;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;

@Getter
@AllArgsConstructor
public enum EmployeeStatusEnum {
    /*
    有效分类：
        在职：A、D、P、S、U
        离职：F、O、T
        退休：R
     */
    A("A","在职"),
    D("D","非活动"),
    F("F","暂时解雇"),
    O("O","已解雇"),
    P("P","带薪假"),
    R("R","已退休"),
    S("S","已暂停"),
    T("T","已离职"),
    U("U","无薪休假");

    private final String code;
    private final String name;

    /**
     * 在职有效用户
     * @return
     */
    public static List<String> getActive(){
        return Arrays.asList(A.code,D.code,P.code,S.code,U.code);
    }

    /**
     * 无效用户
     * @return
     */
    public static List<String> getInvalid(){
        return Arrays.asList(F.code,O.code,T.code,R.code);
    }
}
