package ${packageName}.domain.bo;

import ${packageName}.domain.${ClassName};
#if($table.sub)
import ${packageName}.domain.${subClassName};
#end
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 org.eco.common.orm.core.domain.BaseEntity;
#elseif($table.tree)
import org.eco.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

#if($table.sub)
    /** $table.subTable.functionName信息 */
    private List<${subClassName}> ${subclassName}List;
#end
}
