package com.purui.prims.headless.api.pojo.request;

import com.purui.prims.common.pojo.enums.DataTypeEnums;
import com.purui.prims.headless.api.pojo.DimValueMap;
import com.purui.prims.headless.api.pojo.SchemaItem;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Map;

@Data
@ApiModel(value = "维度Req")
public class DimensionReq extends SchemaItem {

    @ApiModelProperty(value = "模型ID")
    private Long modelId;

    @ApiModelProperty(value = "类型(time,identify,categorical,partition_time)")
    private String type;

    @NotNull(message = "expr can not be null")
    @ApiModelProperty(value = "表达式")
    private String expr;

    //DATE ID CATEGORY
    @ApiModelProperty(value = "语义类型")
    private String semanticType = "CATEGORY";

    @ApiModelProperty(value = "别名")
    private String alias;

    @ApiModelProperty(value = "默认值")
    private List<String> defaultValues;

    @ApiModelProperty(value = "值映射")
    private List<DimValueMap> dimValueMaps;

    @ApiModelProperty(value = "数据类型")
    private DataTypeEnums dataType;

    @ApiModelProperty(value = "扩展信息")
    private Map<String, Object> ext;
}
