ys.artifact-csv.1.0.3.source-code.csv.btl Maven / Gradle / Ivy
package ${packageName};
import cn.hutool.core.convert.Convert;
import cn.hutool.core.text.csv.CsvRow;
import lombok.Getter;
import lombok.ToString;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Collection;
import org.artifact.core.db.BaseCsv;
<%
var extends = "";
if(!strutil.isBlank(csv.ext)){
extends = "extends " + csv.ext;
}
%>
@Getter
@ToString
public class ${csv.name}Csv ${extends} implements BaseCsv{
<%for(field in csv.fields){%>
/** ${field.remark} */
private ${field.type} ${field.name};
<%}%>
public ${csv.name}Csv(CsvRow row){
<%for(field in csv.fields){%>
this.${field.name} = Convert.convert(${field.type}.class, row.get(${fieldLP.index - 1}));
<%}%>
}
}