package ${packageName}.domain.vo;

#foreach ($import in $importList)
import ${import};
#end
import ${packageName}.domain.${ClassName};
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.taais.common.excel.annotation.ExcelDictFormat;
import com.taais.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
#if($table.sub)
import com.mybatisflex.annotation.RelationOneToMany;
import ${packageName}.domain.${subClassName};
#end
import java.io.Serial;
import java.io.Serializable;
#if($table.crud || $table.sub)
import com.taais.common.orm.core.domain.BaseEntity;
#elseif($table.tree)
import com.taais.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
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = ${ClassName}.class)
public class ${ClassName}Vo extends ${Entity} implements Serializable {

@Serial
private static final long serialVersionUID = 1L;

#foreach ($column in $columns)
    #if(!$table.isSuperColumn($column.javaField))
    /** $column.columnComment */
    #if($column.list)
    #set($parentheseIndex=$column.columnComment.indexOf("（"))
    #if($parentheseIndex != -1)
        #set($comment=$column.columnComment.substring(0, $parentheseIndex))
    #else
        #set($comment=$column.columnComment)
    #end
    #if(${column.dictType} && ${column.dictType} != '')
    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "${column.dictType}")
    #elseif($parentheseIndex != -1)
    @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "$column.readConverterExp()")
    #else
    @ExcelProperty(value = "${comment}")
    #end
    private $column.javaType $column.javaField;

    #else
    @ExcelProperty(value = "${column.columnComment}")
    private $column.javaType $column.javaField;

    #end
    #end
#end

#if($table.sub)
    /** $table.subTable.functionName信息 */
    @RelationOneToMany(selfField = "${pkColumn.javaField}", targetField = "${pkColumn.javaField}")
    private List<${subClassName}> ${subclassName}List;
#end

}
