package com.yuchen.saas.park.api.enums;

import lombok.AllArgsConstructor;

/**
 * 服务来源(1:新ISC、2:旧ISC)
 * @author
 */
@AllArgsConstructor
public enum ServiceSourceEnum {

    NEW_ISC(1, "新ISC"),
    OLD_ISC(2, "旧ISC"),
   ;

    private Integer code;

    public Integer getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    private String description;

    public static String getDescByCode(Integer code) {
        ServiceSourceEnum[] enumArray = ServiceSourceEnum.values();
        for (ServiceSourceEnum e : enumArray) {
            if (e.getCode().equals(code)) {
                return e.getDescription();
            }
        }
        return "";
    }
}
