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

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum StationType {

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



    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;
    }
}
