package cd.casic.module.terminal.controller.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.*;
import org.springframework.data.annotation.Id;
import java.util.Date;
import java.util.List;

/**
 *
 * 终端连接日志 查询请求对象
 *
 * @author Yuru Pu
 * @version 1.0
 * @since 2025/7/9 14:07
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "TerminalConnectLogQueryRequest", description = "终端连接日志 查询请求对象")
public class TerminalConnectLogQueryRequest  {

    @NotNull(groups = Id.class)
    @Schema(description = "id")
    private Long id;

    @Schema(description = "id")
    private List<Long> idList;

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

    @Schema(description = "主机id")
    private Long hostId;

    @Size(max = 128)
    @Schema(description = "主机地址")
    private String hostAddress;

    @Size(max = 16)
    @Schema(description = "类型")
    private String type;

    @Size(max = 64)
    @Schema(description = "sessionId")
    private String sessionId;

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

    @Schema(description = "开始时间-区间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date[] startTimeRange;

    @Schema(description = "创建时间 <=")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTimeLe;

    @Schema(description = "状态")
    private List<String> statusList;

}
