package com.prolog.rdc.tms.config.enums;

import lombok.Getter;
import lombok.Setter;

/**
 *
 * 输入框类型 ENUM
 *
 *
 * @version :1.0.0
 * @className: InputTypeEnum
 * @author: kh
 * @creationTime: 2022/1/22 11:13
 * @description:
 * @modifier:
 * @modifyTime:
 * @reviseRemarks:
 */
public enum InputTypeEnum {

	/**
	 * 文本框
	 */
	TEXT(10, "文本框"), SELECT(20, "下拉框"), DATE(30, "日期框");

	@Getter
	@Setter
	Integer code;

	@Getter
	@Setter
	String name;

	InputTypeEnum(Integer code, String name) {
		this.code = code;
		this.name = name;
	}

	public static InputTypeEnum get(Integer code) {
		for (InputTypeEnum value : values()) {
			if (value.getCode().equals(code)) {
				return value;
			}
		}
		return null;
	}
}
