55 lines
1.3 KiB
Plaintext
55 lines
1.3 KiB
Plaintext
package ${packageName}.domain.bo;
|
|
|
|
import ${packageName}.domain.${ClassName};
|
|
import io.github.linpeilie.annotations.AutoMapper;
|
|
import lombok.Data;
|
|
import lombok.EqualsAndHashCode;
|
|
import jakarta.validation.constraints.*;
|
|
#foreach ($import in $importList)
|
|
import ${import};
|
|
#end
|
|
#if($table.crud || $table.sub)
|
|
import com.ruoyi.common.orm.core.domain.BaseEntity;
|
|
#elseif($table.tree)
|
|
import com.ruoyi.common.orm.core.domain.TreeEntity;
|
|
#end
|
|
|
|
/**
|
|
* ${functionName}业务对象 ${tableName}
|
|
*
|
|
* @author ${author}
|
|
* @date ${datetime}
|
|
*/
|
|
#if($table.crud || $table.sub)
|
|
#set($Entity="BaseEntity")
|
|
#elseif($table.tree)
|
|
#set($Entity="TreeEntity")
|
|
#end
|
|
@Data
|
|
@EqualsAndHashCode(callSuper = true)
|
|
@AutoMapper(target = ${ClassName}.class, reverseConvertGenerate = false)
|
|
public class ${ClassName}Bo extends ${Entity}
|
|
{
|
|
|
|
#foreach ($column in $columns)
|
|
#if(!$table.isSuperColumn($column.javaField) && ($column.query || $column.insert || $column.edit))
|
|
/**
|
|
* $column.columnComment
|
|
*/
|
|
#if($column.required)
|
|
#if($column.javaType == 'String')
|
|
@NotBlank(message = "$column.columnComment不能为空")
|
|
#else
|
|
@NotNull(message = "$column.columnComment不能为空")
|
|
#end
|
|
#end
|
|
#if($column.javaType == 'Date')
|
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
|
#end
|
|
private $column.javaType $column.javaField;
|
|
|
|
#end
|
|
#end
|
|
|
|
}
|