package com.yeejoin.amos.boot.module.jxiop.api.Enum;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum StationType {

    FJC("风电场","FJC"),
    JZGFC("集中光伏场","JZGFC"),
    FBSGFC("分布式光伏场","FBSGFC");



    private String name;
    private String code;

    public static String getCode(String name) {

        for (StationType stationType : StationType.values())
        {
            if (stationType.getName().equals(name))
            {
                return stationType.getCode();
            }
        }
        return null;
    }
}
