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

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 申请关联方式0上级1下级
 * @author CXJ
 */
@Getter
@AllArgsConstructor
public enum ApplyInTypeEnum {


	PARENT(0, "上级"),
	CHILD(1, "下级"),
	;

	final Integer code;
	final String name;

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

}
