package com.muyu.system.domain.model;

import com.muyu.common.core.web.model.QueryModel;
import com.muyu.system.domain.rep.SysConfigListReq;
import com.muyu.system.domain.rep.SysDeptListReq;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.util.Date;

/**
 * 参数配置 分页 模型
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class SysDeptPageQueryModel extends QueryModel<SysDeptPageQueryModel> {

    /**
     * 部门名称
     */
    private String deptName;

    /**
     * 部门状态:0正常,1停用
     */
    private String status;


    public static SysDeptPageQueryModel reqBuild(SysDeptListReq sysDeptListReq) {
        SysDeptPageQueryModel sysDeptPageQueryModel = SysDeptPageQueryModel.builder()
                .deptName(sysDeptListReq.getDeptName())
                .status(sysDeptListReq.getStatus())
                .build();
        sysDeptPageQueryModel.domainBuild(sysDeptListReq);
        return sysDeptPageQueryModel;
    }
}
