LoginUser.java 2.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/*
 * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

17
package top.charles7c.cnadmin.common.model.dto;
18

19
import java.io.Serializable;
20
import java.time.LocalDateTime;
21
import java.util.Set;
22

23
import lombok.Data;
24

25 26
import top.charles7c.cnadmin.common.enums.GenderEnum;

27
/**
28
 * 登录用户信息
29 30
 *
 * @author Charles7c
31
 * @since 2022/12/24 13:01
32 33
 */
@Data
34
public class LoginUser implements Serializable {
35 36 37 38

    private static final long serialVersionUID = 1L;

    /**
39
     * 用户ID
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
     */
    private Long userId;

    /**
     * 用户名
     */
    private String username;

    /**
     * 昵称
     */
    private String nickname;

    /**
     * 性别(0未知 1男 2女)
     */
56
    private GenderEnum gender;
57 58

    /**
59 60 61 62 63 64 65 66 67 68 69
     * 手机号码
     */
    private String phone;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 头像地址
70 71 72
     */
    private String avatar;

73
    /**
74
     * 描述
75
     */
76
    private String description;
77

78
    /**
79
     * 最后一次修改密码时间
80 81 82
     */
    private LocalDateTime pwdResetTime;

83 84 85 86 87 88 89 90 91 92
    /**
     * 部门 ID
     */
    private Long deptId;

    /**
     * 部门名称
     */
    private String deptName;

93 94 95 96
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121

    /**
     * 令牌
     */
    private String token;

    /**
     * 登录 IP
     */
    private String clientIp;

    /**
     * 登录地点
     */
    private String location;

    /**
     * 浏览器
     */
    private String browser;

    /**
     * 登录时间
     */
    private LocalDateTime loginTime;
122 123 124 125 126 127 128 129 130 131

    /**
     * 权限码集合
     */
    private Set<String> permissions;

    /**
     * 角色编码集合
     */
    private Set<String> roles;
132
}