mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-12 05:39:00 +08:00
44 lines
906 B
Plaintext
Executable File
44 lines
906 B
Plaintext
Executable File
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;
|
|
import lombok.EqualsAndHashCode;
|
|
#if(${hasBigDecimal})
|
|
import java.math.BigDecimal;
|
|
#end
|
|
import java.io.Serializable;
|
|
import java.time.LocalDateTime;
|
|
|
|
/**
|
|
* ${comments}
|
|
*
|
|
* @author ${author}
|
|
* @date ${datetime}
|
|
*/
|
|
@Data
|
|
@EqualsAndHashCode(callSuper = true)
|
|
@TableName("${tableName}")
|
|
public class ${className} extends Model<${className}> {
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
#foreach ($column in $columns)
|
|
/**
|
|
* $column.comments
|
|
*/
|
|
#if($column.columnName == $pk.columnName)
|
|
@TableId
|
|
#end
|
|
private $column.attrType $column.lowerAttrName;
|
|
#end
|
|
|
|
/**
|
|
* 主键值
|
|
*/
|
|
@Override
|
|
protected Serializable pkVal() {
|
|
return this.$pk.columnName;
|
|
}
|
|
}
|