UserDTO.java 1.6 KB
package com.aigeo.company.dto;

import com.aigeo.common.enums.UserRole;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 用户DTO
 */
@Data
@Schema(description = "用户数据传输对象")
public class UserDTO {

    @Schema(description = "用户ID")
    private Integer id;

    @Schema(description = "所属公司ID")
    private Integer companyId;

    @Schema(description = "用户名")
    private String username;

    @Schema(description = "用户邮箱")
    private String email;

    @Schema(description = "用户全名")
    private String fullName;

    @Schema(description = "用户头像URL")
    private String avatarUrl;

    @Schema(description = "手机号")
    private String phone;

    @Schema(description = "用户角色")
    private UserRole role;

    @Schema(description = "是否启用")
    private Boolean isActive;

    @Schema(description = "最近登录时间")
    private LocalDateTime lastLogin;

    @Schema(description = "上次修改密码时间")
    private LocalDateTime lastPasswordChange;

    @Schema(description = "登录失败次数")
    private Integer failedLoginAttempts;

    @Schema(description = "锁定截止时间")
    private LocalDateTime lockedUntil;

    @Schema(description = "用户时区")
    private String timezone;

    @Schema(description = "用户个性化设置")
    private String preferences;

    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    @Schema(description = "最后更新时间")
    private LocalDateTime updatedAt;
}