package com.yuchen.saas.manage.system.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @ClassName ParkAuthTypeEnum
 * @Description 园区数据类型
 * @Author 肖祥
 * @Date 2022/11/3 11:41
 * @Version 1.0。0
 **/
@Getter
@AllArgsConstructor//权限类型(1:数据权限、2:接口权限)
public enum ParkAuthTypeEnum {

	
	DATA_AUTH(1, "数据权限"),
	API_AUTH(2, "接口权限");

	final Integer type;
	final String name;

	public static ParkAuthTypeEnum of(String name) {
		if (name == null) {
			return null;
		}
		ParkAuthTypeEnum[] values = ParkAuthTypeEnum.values();
		for (ParkAuthTypeEnum smsEnum : values) {
			if (smsEnum.name.equals(name)) {
				return smsEnum;
			}
		}
		return null;
	}

}
