package com.qqchen.deploy.backend.deploy.dto;

import com.qqchen.deploy.backend.framework.dto.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * SSH审计日志DTO
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "SSH审计日志")
public class SSHAuditLogDTO extends BaseDTO {

    @Schema(description = "用户ID")
    private Long userId;

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

    @Schema(description = "服务器ID")
    private Long serverId;

    @Schema(description = "服务器名称")
    private String serverName;

    @Schema(description = "服务器IP")
    private String serverIp;

    @Schema(description = "会话ID")
    private String sessionId;

    @Schema(description = "连接时间")
    private LocalDateTime connectTime;

    @Schema(description = "断开时间")
    private LocalDateTime disconnectTime;

    @Schema(description = "会话时长（秒）")
    private Integer durationSeconds;

    @Schema(description = "客户端IP")
    private String clientIp;

    @Schema(description = "浏览器UA")
    private String userAgent;

    @Schema(description = "执行命令数量")
    private Integer commandCount;

    @Schema(description = "执行的命令记录（JSON）")
    private String commands;

    @Schema(description = "状态")
    private String status;

    @Schema(description = "错误信息")
    private String errorMessage;
}
