/*
 * @Author: Kane
 * @Date: 2023-10-13 14:39:06
 * @LastEditors: Kane
 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/dataimport/bi/ImportBIDataRequest.java
 * @Description:
 *
 * Copyright (c) ${2023} by Kane, All Rights Reserved.
 */
package com.cpic.xim.web.controllers.dataimport.bi;

import com.fasterxml.jackson.annotation.JsonProperty;
import org.springframework.stereotype.Controller;

@Controller
public class ImportBIDataRequest {

    // 导入文件的路径
    @JsonProperty("filePath")
    private String filePath;

    // 报表名称
    @JsonProperty("reportType")
    private int reportType;

    // 是否有标题行
    @JsonProperty("firstRow")
    private int firstRow;

    // sheet索引
    @JsonProperty("sheetIndex")
    private int sheetIndex;

    public ImportBIDataRequest() {}

    public int getFirstRow() {
        return firstRow;
    }

    public void setFirstRow(int firstRow) {
        this.firstRow = firstRow;
    }

    public int getSheetIndex() {
        return sheetIndex;
    }

    public void setSheetIndex(int sheetIndex) {
        this.sheetIndex = sheetIndex;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public int getReportType() {
        return reportType;
    }

    public void setReportType(int reportType) {
        this.reportType = reportType;
    }

    @Override
    public int hashCode()
    {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((filePath == null) ? 0 : filePath.hashCode());
        result = prime * result + reportType;
        result = prime * result + firstRow;
        result = prime * result + sheetIndex;
        return result;
    }

    @Override
    public boolean equals( Object obj )
    {
        if ( this == obj )
            return true;
        if ( obj == null )
            return false;
        if ( getClass() != obj.getClass() )
            return false;
        ImportBIDataRequest other = (ImportBIDataRequest) obj;
        if ( filePath == null )
        {
            if ( other.filePath != null )
                return false;
        }
        else if ( !filePath.equals( other.filePath ) )
            return false;
        if ( reportType != other.reportType )
            return false;
        if ( firstRow != other.firstRow )
            return false;
        if ( sheetIndex != other.sheetIndex )
            return false;
        return true;
    }

    @Override
    public String toString() {
        return (
            "ImportBIDataRequest [filePath=" +
            filePath +
            ", reportType=" +
            reportType +
            ", firstRow=" +
            firstRow +
            ", sheetIndex=" +
            sheetIndex +
            "]"
        );
    }
}
