package com.lesingle.edu.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 操作日志实体
 */
@Schema(description = "操作日志实体")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("operation_log")
public class OperationLog extends BaseEntity {

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

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

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

    @Schema(description = "操作类型（CREATE/UPDATE/DELETE/QUERY/EXPORT/IMPORT/OTHER)")
    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;

}
