package com.qqchen.deploy.backend.deploy.query;

import com.qqchen.deploy.backend.framework.annotation.QueryField;
import com.qqchen.deploy.backend.framework.enums.QueryType;
import com.qqchen.deploy.backend.framework.query.BaseQuery;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * SSH审计日志查询条件
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "SSH审计日志查询条件")
public class SSHAuditLogQuery extends BaseQuery {

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

    @Schema(description = "用户名")
    @QueryField(field = "username", type = QueryType.LIKE)
    private String username;

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

    @Schema(description = "服务器IP")
    @QueryField(field = "serverIp", type = QueryType.LIKE)
    private String serverIp;

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

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

    @Schema(description = "连接开始时间")
    @QueryField(field = "connectTime", type = QueryType.START_WITH)
    private LocalDateTime connectTimeStart;

    @Schema(description = "连接结束时间")
    @QueryField(field = "connectTime", type = QueryType.END_WITH)
    private LocalDateTime connectTimeEnd;
}
