mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 20:49:00 +08:00
🔖 发布一个版本。 v1.4.0 新增代码生成
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user