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

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum GeneratingCapacity {
    DAY("日发电量","0"),
    MONTH("月发电量","1"),
    YEAR("年发电量","2");



    private String name;
    private String code;

    public static String getCode(String name) {

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

}
