mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-13 18:45:06 +08:00
引入 Velocity 模板引擎,生成代码~
This commit is contained in:
30
src/main/resources/codegen/dal/do.vm
Normal file
30
src/main/resources/codegen/dal/do.vm
Normal file
@ -0,0 +1,30 @@
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* ${table.description}
|
||||
*/
|
||||
@TableName("${table.tableName}")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ${table.tableName}DO extends BaseDO {
|
||||
|
||||
#foreach ($column in $columns)
|
||||
/**
|
||||
* ${column.columnComment}
|
||||
*/
|
||||
#if(${column.primaryKey} && ${column.javaType} != 'String')
|
||||
@TableId
|
||||
#end
|
||||
#if(${column.primaryKey} && ${column.javaType} == 'String')
|
||||
@TableId(type = IdType.INPUT)
|
||||
#end
|
||||
private ${column.javaType} ${column.javaField};
|
||||
#end
|
||||
|
||||
}
|
Reference in New Issue
Block a user