/**
 * 
 */
package org.springblade.datasource.model;

import lombok.Data;
import org.springblade.datasource.enums.DetailColumnTypeEnum;
import org.springblade.datasource.enums.ViewColumnTypeEnum;

import java.io.Serializable;

/**
 * <p>文件上传结构体</p>
 * @author  wookvn
 * @datetime 2025-01-13 16:44:13
 */
@Data
public class FileStructureDto implements Serializable {

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 字段名
	 */
	private String columnName;

	/**
	 * 字段类型
	 */
	private ViewColumnTypeEnum columnType;

	/**
	 * 字段归类细化类型
	 */
	private DetailColumnTypeEnum detailColumnType;

	/**
	 * 注释
	 */
	private String comment;

	/**
	 * 是否主键
	 */
	private boolean primaryKey;

	/**
	 * 字段长度
	 */
	private Integer columnSize;

	/**
	 * 小数点后的位数
	 */
	private Integer decimalDigits;

	/**
	 * 系统默认字段名(COL_开头)
	 */
	private String systemColumnName;
	/**
	 * 全拼字段名
	 */
	private String pinyinAllColumnName;
	/**
	 * 首字母字段名
	 */
	private String pinyinFirstLetterColumnName;

	/**
	 * 字段在excel的索引 - 主要用于取数据
	 */
	private int columnIndex;

	/**
	 * @param columnName
	 * @param columnType
	 * @param comment
	 * @param columnIndex
	 */
	public FileStructureDto(String columnName, ViewColumnTypeEnum columnType, String comment, int columnIndex) {
		super();
		this.columnName = columnName;
		this.columnType = columnType;
		this.comment = comment;
		this.columnIndex = columnIndex;
	}

	public FileStructureDto(String columnName, ViewColumnTypeEnum columnType, String comment, boolean primaryKey) {
		super();
		this.columnName = columnName;
		this.columnType = columnType;
		this.comment = comment;
		this.primaryKey = primaryKey;
	}
	public FileStructureDto(String columnName, ViewColumnTypeEnum columnType, DetailColumnTypeEnum detailColumnType, String comment, boolean primaryKey) {
		super();
		this.columnName = columnName;
		this.columnType = columnType;
		this.detailColumnType = detailColumnType;
		this.comment = comment;
		this.primaryKey = primaryKey;
	}

	/**
	 *
	 */
	public FileStructureDto() {
		super();
	}
}
