package cn.lihongjie.coal.excelGeneratorSheetInfo.dto;

import cn.lihongjie.coal.base.dto.CommonDto;

import lombok.Data;

import org.hibernate.annotations.Comment;
import org.hibernate.annotations.Formula;

@Data
public class CreateExcelGeneratorSheetInfoDto extends CommonDto {

    @Comment("数据源类型")
    private String dataSourceType;

    @Formula(
            "(select i.name\n"
            + "from t_dictionary d,\n"
            + "     t_dictionary_item i\n"
            + "where d.id = i.dictionary_id\n"
            + "  and d.code = 'excel.generator.datasource.type'\n"
            + "  and i.code = data_source_type)")
    private String dataSourceTypeName;


    @Comment("数据源-url")
    private String dataSourceUrl;


    @Comment("数据源-请求方式")
    private String dataSourceMethod;


    @Comment("数据源-请求参数")
    private String dataSourceParams;


    @Comment("数据源-额外请求头")
    private String dataSourceHeaders;
}
