package com.sckw.core.model.enums;

import lombok.Getter;

/**
 * @author czh
 * @desc 系统类型枚举
 * @date 2023/6/15
 */
@Getter
public enum SystemTypeEnum {
    //运营端
    MANAGE(1, "运营端"),
    //企业开户
    COMPANY(2, "企业端"),
    //司机
    DRIVER(3, "司机端");

    private final Integer code;

    private final String name;

    SystemTypeEnum(Integer code, String name){
        this.code = code;
        this.name = name;
    }

    public static SystemTypeEnum getName(Integer code){
        for (SystemTypeEnum systemTypeEnum : values()) {
            if (systemTypeEnum.getCode().equals(code)) {
                return systemTypeEnum;
            }
        }
        return null;
    }
}
