package cn.ey.biz.module.system.api.auth.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Set;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AuthPermissionInfoDTO {

    @ApiModelProperty(value = "用户信息", required = true)
    private UserVO user;

    @ApiModelProperty(value = "角色标识数组", required = true)
    private Set<String> roles;

    @ApiModelProperty(value = "操作权限数组", required = true)
    private Set<String> permissions;

    @ApiModel("用户信息 VO")
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class UserVO {

        @ApiModelProperty(value = "用户编号", required = true, example = "1024")
        private Long id;

        @ApiModelProperty(value = "用户昵称", required = true, example = "xxx")
        private String nickname;

        @ApiModelProperty(value = "用户头像", required = true, example = "http://www.xxx.cn/xx.jpg")
        private String avatar;

        @ApiModelProperty(value = "base 地",  example = "xxx")
        private String baseLocation;

        @ApiModelProperty(value = "职业级别",  example = "xxx")
        private String rankCode;

        @ApiModelProperty(value = "gpn",  example = "xxx")
        private String gpn;

        @ApiModelProperty(value = "账号",  example = "xxx")
        private String username;

        @ApiModelProperty(value = "serviceLine",  example = "xxx")
        private String serviceLine;

        @ApiModelProperty(value = "subServiceLine",  example = "xxx")
        private String subServiceLine;

        @ApiModelProperty(value = "mgmtRegion",  example = "xxx")
        private String mgmtRegion;

        @ApiModelProperty(value = "displayName",  example = "xxx")
        private String displayName;




    }
}
