🔖 发布一个版本。 v1.4.0 新增代码生成

This commit is contained in:
冷冷 committed 2018-08-02 22:16:14 +08:00
1 parent 4e6ce28340
commit cbceb44fb4
18 files changed
+246 -99

No files matched your search

@@ -1,5 +1,6 @@
package ${package}.${moduleName}.entity;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;
@@ -19,7 +20,7 @@ import java.time.LocalDateTime;
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("${tableName}")
public class ${className} implements Serializable {
public class ${className} extends Model<${className}> {
private static final long serialVersionUID = 1L;
#foreach ($column in $columns)
@@ -31,4 +32,12 @@ public class ${className} implements Serializable {
#end
private $column.attrType $column.lowerAttrName;
#end
/**
* 主键值
*/
@Override
protected Serializable pkVal() {
return this.$pk.columnName;
}
}