package com.engine.salary.entity.salaryitem.config;

import com.engine.salary.enums.SalaryRoundingModeEnum;
import com.engine.salary.enums.SalaryValueTypeEnum;
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
import com.engine.salary.util.excel.ExcelHead;
import com.engine.salary.util.excel.ExcelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;


@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class SalaryItemExcelConfig {

    /**
     * 名称
     */
    @ExcelHead(title="名称",dataIndex = "name")
    @ExcelProperty(index = 0)
    private String name;

    /**
     * 默认使用。0：默认不适用、1：默认使用
     */
    @ExcelHead(title="是否默认使用",dataIndex = "useDefault")
    @ExcelProperty(index = 1)
    private String useDefault;

    /**
     * 核算是否隐藏
     */
    @ExcelHead(title="核算是否隐藏",dataIndex = "hideDefault")
    @ExcelProperty(index = 2)
    private String hideDefault;

    /**
     * 字段类型
     *
     * @see SalaryDataTypeEnum
     */
    @ExcelHead(title="字段类型",dataIndex = "dataType")
    @ExcelProperty(index = 3)
    private String dataType;

    /**
     * 进位规则
     *
     * @see SalaryRoundingModeEnum
     */
    @ExcelHead(title="进位规则",dataIndex = "roundingMode")
    @ExcelProperty(index = 4)
    private String roundingMode;

    /**
     * 保留的小数位数
     */
    @ExcelHead(title="保留的小数位数",dataIndex = "pattern")
    @ExcelProperty(index = 5)
    private String pattern;

    /**
     * 取值方式
     *
     * @see SalaryValueTypeEnum
     */
    @ExcelHead(title="取值方式",dataIndex = "valueType")
    @ExcelProperty(index = 6)
    private String valueType;

    /**
     * 公式
     */
    @ExcelHead(title="公式",dataIndex = "formula")
    @ExcelProperty(index = 7)
    private String formula;

    @ExcelHead(title="sql返回字段",dataIndex = "sqlReturnKey")
    @ExcelProperty(index = 8)
    private String extendParam;

    /**
     * 排序
     */
    @ExcelHead(title="排序",dataIndex = "sortedIndex")
    @ExcelProperty(index = 9)
    private String sortedIndex;

    /**
     * 宽度
     */
    @ExcelHead(title="宽度",dataIndex = "width")
    @ExcelProperty(index = 10)
    private String width;

    /**
     * 默认值
     */
    @ExcelHead(title="默认值",dataIndex = "defaultValue")
    @ExcelProperty(index = 11)
    private String defaultValue;

    /**
     * 备注
     */
    @ExcelHead(title="备注",dataIndex = "description")
    @ExcelProperty(index = 12)
    private String description;

}
