package com.zhongshu.card.server.core.domain.upload;

import com.zhongshu.card.server.core.domain.base.SuperMain;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.checkerframework.common.aliasing.qual.NonLeaked;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.HashMap;
import java.util.Map;

/**
 * 接口使用频率
 *
 * @author TRX
 * @date 2025/2/18
 */
@Data
@Document
@AllArgsConstructor
@NoArgsConstructor
@NonLeaked
public class InterfaceUseRecord extends SuperMain {

    @Schema(description = "")
    private String key;

    private String interfaceName;

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

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

    @Schema(description = "api地址")
    private String url;

    @Schema(description = "扩展信息")
    private Map<String, Object> metaInfo = new HashMap<String, Object>();
}
