Bladeren bron

优化代码生成器

jobob 8 jaren geleden
bovenliggende
commit
ae18fba617

+ 57 - 0
mybatis-plus/src/main/java/com/baomidou/mybatisplus/generator/config/rules/DbColumnType.java

@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2011-2020, hubin (jobob@qq.com).
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.baomidou.mybatisplus.generator.config.rules;
+
+/**
+ * <p>
+ * 表字段类型
+ * </p>
+ * 
+ * @author hubin
+ * @since 2017-01-11
+ */
+public enum DbColumnType {
+	STRING("String", null),
+	LONG("Long", null),
+	INTEGER("Integer", null),
+	FLOAT("Float", null),
+	DOUBLE("Double", null),
+	BOOLEAN("Boolean", null),
+	BYTE_ARRAY("byte[]", null),
+	OBJECT("Object", null),
+	DATE("Date", "java.util.Date"),
+	BIG_DECIMAL("BigDecimal", "java.math.BigDecimal");
+
+	/** 类型 */
+	private final String type;
+
+	/** 包路径 */
+	private final String pkg;
+
+	DbColumnType(final String type, final String pkg) {
+		this.type = type;
+		this.pkg = pkg;
+	}
+
+	public String getType() {
+		return this.type;
+	}
+
+	public String getPkg() {
+		return this.pkg;
+	}
+
+}