/**
 * 
 */
package org.springblade.etl.dto;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.springblade.datasource.enums.DetailColumnTypeEnum;

import com.alibaba.fastjson2.JSON;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author wookvn
 *
 */
@Data
public class DataApiInsertParamDTO implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@ApiModelProperty(value = "参数说明")
	private String title;
	
	@ApiModelProperty(value = "数据库字段名")
	private String columnName;
	
	@ApiModelProperty(value = "API参数名")
	private String paramName;
	
	@ApiModelProperty(value = "细化字段类型(与数据库表接口返回的detailColumnType一致)")
	private DetailColumnTypeEnum columnType;
	
	@ApiModelProperty(value = "是否可选(根据字段是否为空设置,1-可选/0-必填)")
	private Integer optionalStatus;
	
	
	public static void main(String[] args) {
		List<DataApiInsertParamDTO> paramList = new ArrayList<>();
		DataApiInsertParamDTO f1 = new DataApiInsertParamDTO();
		f1.setColumnName("COL_0");
		f1.setTitle("商品编码");
		f1.setParamName("col0");
		f1.setColumnType(DetailColumnTypeEnum.STRING);
		f1.setOptionalStatus(1);
		paramList.add(f1);
		
		DataApiInsertParamDTO f2 = new DataApiInsertParamDTO();
		f2.setColumnName("COL_1");
		f2.setTitle("商品类别");
		f2.setParamName("col1");
		f2.setColumnType(DetailColumnTypeEnum.STRING);
		f2.setOptionalStatus(1);
		paramList.add(f2);
		
		DataApiInsertParamDTO f3 = new DataApiInsertParamDTO();
		f3.setColumnName("COL_2");
		f3.setTitle("商品名称");
		f3.setParamName("col2");
		f3.setColumnType(DetailColumnTypeEnum.STRING);
		f3.setOptionalStatus(1);
		paramList.add(f3);
		
		DataApiInsertParamDTO f4 = new DataApiInsertParamDTO();
		f4.setColumnName("JHBI_USER_ID");
		f4.setTitle("创建人ID");
		f4.setParamName("userid");
		f4.setColumnType(DetailColumnTypeEnum.LONG);
		f4.setOptionalStatus(1);
		paramList.add(f4);
		
		System.out.println(JSON.toJSONString(paramList));
	}
}
