package com.zhangmeng.model.dto.query;

import lombok.Data;

import java.io.Serializable;

/**
 * jpa 查询条件封装
 *
 * @author zhangmeng
 * @version 1.0
 * @date 2021年6月17日14:33:52
 */
@Data
public class JpaQueryData implements Serializable {

    public enum Condition {
        between,
        like,
        equal;
    }

    private String key; //字段

    private Object value; //值

    private Condition condition; //条件

    private Between between;

    public static class Between {

        private Object var1;

        private Object var2;

        public Object getVar1() {
            return var1;
        }

        public void setVar1(Object var1) {
            this.var1 = var1;
        }

        public Object getVar2() {
            return var2;
        }

        public void setVar2(Object var2) {
            this.var2 = var2;
        }
    }
}