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

import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.salary.annotation.SalaryTable;
import com.engine.salary.annotation.SalaryTableColumn;
import com.engine.salary.annotation.TableTitle;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 系统薪资项目列表
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@SalaryTable(pageId = "a4f85287-6111-7721-adn9-7d06e54y6rj9",
        fields = " t.id, t.name, t.category, t.item_type as itemType, t.rounding_mode as roundingMode, t.pattern, t.value_type as valueType,t.data_type as dataType",
        fromSql = "   FROM hrsa_sys_salary_item t",
        tableType = WeaTableType.CHECKBOX)
public class SysSalaryItemListDTO {

    //主键id")
    @JsonSerialize(using = ToStringSerializer.class)
    @SalaryTableColumn(column = "id", display = false)
    private Long id;

    @SalaryTableColumn(text = "名称", width = "10%", column = "name")
    @TableTitle(title = "名称", key = "name", dataIndex = "name")
    private String name;

    @SalaryTableColumn(text = "进位规则", width = "10%", column = "roundingMode",transmethod = "com.engine.salary.transmethod.TransMethod.roundingMode")
    @TableTitle(title = "进位规则", key = "roundingMode", dataIndex = "roundingMode")
    private String roundingMode;

    @SalaryTableColumn(text = "保留小数位", width = "10%", column = "pattern")
    @TableTitle(title = "保留小数位", key = "pattern", dataIndex = "pattern")
    private Integer pattern;

    @SalaryTableColumn(text = "取值方式", width = "10%", column = "valueType",transmethod = "com.engine.salary.transmethod.TransMethod.datasource")
    @TableTitle(title = "取值方式", key = "valueType", dataIndex = "valueType")
    private String valueType;

    @SalaryTableColumn(text = "字段类型", width = "10%", column = "dataType",transmethod = "com.engine.salary.transmethod.TransMethod.dataType")
    @TableTitle(title = "字段类型", key = "dataType", dataIndex = "dataType")
    private String dataType;

//    @SalaryTableColumn(text = "个税申报表对应字段", width = "10%", column = "taxDeclarationColumn")
    private String taxDeclarationColumn;

//    @SalaryTableColumn(text = "操作", width = "20%", column = "operate")
//    private String operate;
}
