package com.mosty.common.core.login;

import com.mosty.common.core.business.entity.SysDept;
import com.mosty.common.core.business.entity.SysMenu;
import com.mosty.common.core.login.dto.DeptDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.List;
import java.util.Set;

/**
 * 登陆返回信息
 *
 * @author kevin
 * @date 2022/2/15 10:24 PM
 * @since 1.0.0
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class LoginResponseVO {
//
//    @ApiModelProperty("jwt token信息")
//    private String jwtToken;
//
//    @ApiModelProperty("用户id")
//    private Long userId;
//
//    @ApiModelProperty("用户名称")
//    private String userName;
//
//    @ApiModelProperty("权限信息")
//    private UserPermissionsInfo permissionsInfo;
//
//    @ApiModelProperty("用户挂的部门集合")
//    private List<DeptDTO> deptList;
//
//    @ApiModelProperty("用户挂一级菜单和菜单组")
//    private List<SysMenu> menuList;
//
//    @ApiModelProperty("菜单唯一编码集合")
//    private Set<String> menuCodeSet;
//
//    @ApiModelProperty("分县局")
//    private SysDept fxjDept;
//
//    @ApiModelProperty("地市州")
//    private SysDept dszDept;
//
//    @ApiModelProperty(value = "身份证号")
//    private String idEntityCard;


    @ApiModelProperty("jwt token信息")
    private String jwtToken;

    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty("用户名称")
    private String userName;

    @ApiModelProperty("用户部门")
    private List<DeptDTO> deptList;

    @ApiModelProperty("用户挂一级菜单和菜单组")
    private List<SysMenu> menuList;

    @ApiModelProperty("菜单唯一编码集合")
    private Set<String> menuCodeSet;

    @ApiModelProperty(value = "身份证号")
    private String idEntityCard;

    @ApiModelProperty(value = "是否融合")
    private String sfrh;

    @ApiModelProperty(value = "模块")
    private String mk;


    public LoginResponseVO(String jwtToken, Long userId, String userName, List<DeptDTO> deptList, String idEntityCard, String sfrh, String mk) {
        this.jwtToken = jwtToken;
        this.userId = userId;
        this.userName = userName;
        this.deptList = deptList;
        this.idEntityCard = idEntityCard;
        this.sfrh = sfrh;
        this.mk = mk;
    }

    public LoginResponseVO(Long userId, String userName, List<DeptDTO> deptList,
                           SysDept fxjDept, SysDept dszDept, String idEntityCard, String sfrh, String mk) {
        this.userId = userId;
        this.userName = userName;
        this.deptList = deptList;
//        this.fxjDept = fxjDept;
//        this.dszDept = dszDept;
        this.idEntityCard = idEntityCard;
        this.sfrh = sfrh;
        this.mk = mk;
    }
}
