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

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

import java.util.Set;

public class AuthorityBuilder extends BaseEntityBuilder{

    private String name;
    private Boolean enabled;
    private String remark;
    private Set<Authority> aut;

    public static AuthorityBuilder aAuthority(){
        return new AuthorityBuilder();
    }

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

    public AuthorityBuilder enabled(Boolean enabled){
        this.enabled = enabled;
        return this;
    }

    public AuthorityBuilder remark(String remark){
        this.remark = remark;
        return this;
    }

    public AuthorityBuilder authorities(Set<Authority> authorities){
        this.aut = authorities;
        return this;
    }
    public Authority build(){
        Authority authority = new Authority();
        authority.setName(name);
        authority.setEnabled(enabled);
        authority.setRemark(remark);
        return authority;
    }

}
