package com.lesingle.edu.dto.response;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 操作日志响应
 * 用于返回操作日志信息给前端
 */
@Data
@Builder
@Schema(description = "操作日志响应")
public class OperationLogResponse {

    @Schema(description = "ID")
    private Long id;

    @Schema(description = "租户 ID")
    private Long tenantId;

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

    @Schema(description = "用户角色")
    private String userRole;

    @Schema(description = "操作")
    private String action;

    @Schema(description = "模块")
    private String module;

    @Schema(description = "目标类型")
    private String targetType;

    @Schema(description = "目标 ID")
    private Long targetId;

    @Schema(description = "详情")
    private String details;

    @Schema(description = "IP 地址")
    private String ipAddress;

    @Schema(description = "用户代理")
    private String userAgent;

    @Schema(description = "请求参数（JSON 格式）")
    private String requestParams;

    @Schema(description = "请求接口路径")
    private String requestUri;

    @Schema(description = "创建人")
    private String createBy;

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