package com.zsc.edu.gateway.domain.system;

import com.zsc.edu.gateway.modules.system.entity.Dept;

import java.util.List;

public class DeptBuilder extends BaseEntityBuilder {

    public String name;
    public Dept parent;
    public Long pid;

    public List<Dept> children;


    public static DeptBuilder aDept(){
        return new DeptBuilder();
    }

    public DeptBuilder name(String name){
        this.name = name;
        return this;
    }


    public DeptBuilder parent(Dept parent) {
        this.parent = parent;
        return this;
    }

    public DeptBuilder pid(Long pid) {
        this.pid = pid;
        return this;
    }

    public DeptBuilder children(List<Dept> children) {
        this.children = children;
        return this;
    }


    public Dept build(){
        Dept dept = new Dept();
        dept.setName(name);
        dept.setPid(pid);
        dept.setChildren(children);
        return dept;
    }


}
