package com.prolog.rdc.tms.model.vo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 *
 * 高级查询条件配置明细 VO
 *
 *
 * @className: SysQueryConditionVO
 * @author: kh
 * @creationTime: 2022-01-19 09:39:31
 * @description:
 * @modifier:
 * @modifyTime:
 * @reviseRemarks:
 *
 * @version :1.0.0
 *
 */
@Data
@ApiModel("高级查询条件明细 VO")
public class SysQueryConditionParam implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "行ID")
    @Size(max = 32, message = "行ID最大长度32")
    private Long lineId;

    @ApiModelProperty(value = "汇总表ID")
    @Size(max = 32, message = "汇总表ID最大长度32")
    private String hid;

    @ApiModelProperty(value = "字段编码")
    @NotBlank(message = "字段编码必填")
    @Size(max = 100, message = "字段编码最大长度100")
    private String fieldCode;

    @ApiModelProperty(value = "字段编码")
    @NotBlank(message = "字段编码必填")
    @Size(max = 100, message = "字段编码最大长度100")
    private String column;

    @ApiModelProperty(value = "输入框类型，10.文本框、20下拉框、30日期框", notes = "10.文本框、20下拉框、30日期框")
    private Integer type;

    /**
     * 10.数值、20字符、30日期、40.布尔、99其它
     */
    @ApiModelProperty(value = "字段类型", notes = "")
    private Integer fieldType;

    @ApiModelProperty(value = "比较操作符编码")
    @Size(max = 20, message = "比较操作符编码最大长度10")
    @NotBlank(message = "比较操作符编码必填")
    private String comparisonOperatorCode;

    @ApiModelProperty(value = "比较操作符")
    private String comparisonOperator;

    @ApiModelProperty(value = "逻辑操作符编码")
    private Integer logicalOperatorCode;

    @ApiModelProperty(value = "逻辑操作符")
    private String logicalOperator;

    @ApiModelProperty(value = "条件")
    @Size(max = 500, message = "条件最大长度500")
    private Object condition;

    @JsonIgnore
    @ApiModelProperty(value = "是否展示")
    private boolean shown;

    @JsonIgnore
    @ApiModelProperty(value = "必须的条件")
    private boolean must;

    @ApiModelProperty(value = "排序号")
    private Integer sort;
}
