package ${packageName}.domain.bo;

import ${packageName}.domain.${ClassName};
import org.ruoyi.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
#foreach ($import in $importList)
import ${import};
import java.io.Serializable;
import org.ruoyi.common.core.validate.AddGroup;
import org.ruoyi.common.core.validate.EditGroup;
#end

/**
 * ${functionName}业务对象 ${tableName}
 *
 * @author ${author}
 * @date ${datetime}
 */
@Data

@AutoMapper(target = ${ClassName}.class, reverseConvertGenerate = false)
public class ${ClassName}Bo implements Serializable {

#foreach ($column in $columns)
    #if($column.isPk)
    private $column.javaType $column.javaField;

    #elseif($column.insert || $column.edit)
    /**
     * $column.columnComment
     */
    #if($column.insert && $column.edit)
        #set($Group="AddGroup.class, EditGroup.class")
    #elseif($column.insert)
        #set($Group="AddGroup.class")
    #elseif($column.edit)
        #set($Group="EditGroup.class")
    #end
    #if($column.required)
    #if($column.javaType == 'String')
    @NotBlank(message = "$column.columnComment不能为空", groups = { $Group })
    #else
    @NotNull(message = "$column.columnComment不能为空", groups = { $Group })
    #end
    #end
    private $column.javaType $column.javaField;
    #end
#end

}
