package cn.com.victorysoft.business.sys.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@ApiModel("动态列数据")
@Data
public class DynamicColumnData {

    @ApiModelProperty("表格列")
    private List<Column> columnList = new ArrayList<>();
    @ApiModelProperty("表格数据")
    private List<Map<String, Object>> dataList = new ArrayList<>();

    @ApiModel("列定义")
    @Data
    public static class Column{
        public Column(String property, String label) {
            this.property = property;
            this.label = label;
        }
        @ApiModelProperty("属性")
        private String property;
        @ApiModelProperty("标签")
        private String label;
        @ApiModelProperty("是否单位")
        private Boolean isUnit = false;
        @ApiModelProperty("单位等级")
        private BigDecimal unitLevel;
        @ApiModelProperty("类型代码")
        private String typeCode;
    }
}
