package net.northking.cctp.element.internal.dto;


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

public class FieldDto implements Comparable<FieldDto>,Serializable {

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

    /**
     * 字段中文名
     */
    private String columnCnName;

    /**
     * 字段类型,1为基础类型，2为数组
     */
    private String columnType;

    /**
     * 数据类型，1：对象、2：字符、3：整数、4：带小数点数字、5：布尔值
     */
    private String dataType;

    /**
     * 长度，默认无需设置
     */
    private Integer columnLength;

    /**
     * 填充规则,0:左补0、1:右补0、2:左补空格、3:右补空格
     */
    private String fillRule;

    /**
     * 默认值
     */
    private String defaultValue;

    /**
     * 是否接受传参,Y和N
     */
    private String isPassParam;

    /**
     * 顺序
     */
    private Integer columnOrder;

    /**
     * 子参数
     */
    private List<FieldDto> childrenColumn;

    /**
     * 节点路径
     */
    private String path;

    @Override
    public int compareTo(FieldDto o) {
        return this.getColumnOrder() - o.getColumnOrder();
    }


    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getColumnCnName() {
        return columnCnName;
    }

    public void setColumnCnName(String columnCnName) {
        this.columnCnName = columnCnName;
    }

    public String getColumnType() {
        return columnType;
    }

    public void setColumnType(String columnType) {
        this.columnType = columnType;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public Integer getColumnLength() {
        return columnLength;
    }

    public void setColumnLength(Integer columnLength) {
        this.columnLength = columnLength;
    }

    public String getFillRule() {
        return fillRule;
    }

    public void setFillRule(String fillRule) {
        this.fillRule = fillRule;
    }

    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public String getIsPassParam() {
        return isPassParam;
    }

    public void setIsPassParam(String isPassParam) {
        this.isPassParam = isPassParam;
    }

    public Integer getColumnOrder() {
        return columnOrder;
    }

    public void setColumnOrder(Integer columnOrder) {
        this.columnOrder = columnOrder;
    }

    public List<FieldDto> getChildrenColumn() {
        return childrenColumn;
    }

    public void setChildrenColumn(List<FieldDto> childrenColumn) {
        this.childrenColumn = childrenColumn;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }
}
