package org.nl.system.service.dept.dto;

import lombok.Data;
import org.nl.common.domain.query.BaseQuery;
import org.nl.common.domain.query.QParam;
import org.nl.common.enums.QueryTEnum;
import org.nl.system.service.dept.dao.SysDept;

import java.util.List;

/*
 * @author ZZQ
 * @Date 2022/12/15 4:20 下午
 */
@Data
public class DeptQuery extends BaseQuery<SysDept> {

    private List<Long> deptIds;

    private String name;

    private String code;

    private Long pid;

    private Boolean pid_is_null;

    @Override
    public void paramMapping() {
        super.doP.put("pid_is_null", QParam.builder().k(new String[]{"pid"}).type(QueryTEnum.NO).build());
        super.doP.put("deptIds", QParam.builder().k(new String[]{"dept_id"}).type(QueryTEnum.IN).build());
    }
}
