|
@@ -0,0 +1,68 @@
|
|
|
+package ${package.Entity};
|
|
|
+
|
|
|
+#if(${activeRecord})
|
|
|
+import com.baomidou.mybatisplus.activerecord.Model;
|
|
|
+#end
|
|
|
+#if(${idGenType}!="ID_WORKER")
|
|
|
+import com.baomidou.mybatisplus.annotations.IdType;
|
|
|
+import com.baomidou.mybatisplus.annotations.TableId;
|
|
|
+#end
|
|
|
+import com.baomidou.mybatisplus.annotations.TableField;
|
|
|
+#if(${addTabeName})
|
|
|
+import com.baomidou.mybatisplus.annotations.TableName;
|
|
|
+#end
|
|
|
+import java.io.Serializable;
|
|
|
+#if(${table.hasDate})
|
|
|
+import java.util.Date;
|
|
|
+#end
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * ${table.comment}
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author ${author}
|
|
|
+ * @since ${date}
|
|
|
+ */
|
|
|
+#if(${addTabeName})
|
|
|
+@TableName("${table.name}")
|
|
|
+#end
|
|
|
+#if(${activeRecord})
|
|
|
+public class ${entity} extends Model<${entity}> {
|
|
|
+#else
|
|
|
+public class ${entity} implements Serializable {
|
|
|
+#end
|
|
|
+
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+
|
|
|
+#foreach($field in ${table.fields})
|
|
|
+ /**
|
|
|
+ * ${field.comment}
|
|
|
+ */
|
|
|
+#if(${field.keyFlag} && ${idGenType}!="ID_WORKER")
|
|
|
+ @TableId(type = IdType.${idGenType})
|
|
|
+#end
|
|
|
+#if($field.convert && ${field.name.toLowerCase()} != ${field.propertyName.toLowerCase()})
|
|
|
+ @TableField(value="${field.name}")
|
|
|
+#end
|
|
|
+ private ${field.propertyType} ${field.propertyName};
|
|
|
+
|
|
|
+#end
|
|
|
+
|
|
|
+#foreach($field in ${table.fields})
|
|
|
+#if(${field.propertyName.equals("Boolean")})
|
|
|
+#set($getprefix="is")
|
|
|
+#else
|
|
|
+#set($getprefix="get")
|
|
|
+#end
|
|
|
+
|
|
|
+ public ${field.propertyType} ${getprefix}${field.capitalName}() {
|
|
|
+ return ${field.propertyName};
|
|
|
+ }
|
|
|
+
|
|
|
+ public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
|
|
|
+ this.${field.propertyName} = ${field.propertyName};
|
|
|
+ }
|
|
|
+#end
|
|
|
+
|
|
|
+}
|