package com.qmth.paper.library.common.bean.result;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.paper.library.common.bean.dto.MenuPrivilegeDto;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;

/**
 * @Description: 菜单返回结果
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2021/7/28
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class MenuResult implements Serializable {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "用户id")
    Long userId;

    @ApiModelProperty(value = "权限集合")
    List<MenuPrivilegeDto> privileges;

    public MenuResult() {

    }

    public MenuResult(Long userId, List<MenuPrivilegeDto> privileges) {
        this.userId = userId;
        this.privileges = privileges;
    }

    public MenuResult(List<MenuPrivilegeDto> privileges) {
        this.privileges = privileges;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public List<MenuPrivilegeDto> getPrivileges() {
        return privileges;
    }

    public void setPrivileges(List<MenuPrivilegeDto> privileges) {
        this.privileges = privileges;
    }
}
