提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.infra.api.logger.dto; |
H |
2 |
|
|
3 |
import io.swagger.v3.oas.annotations.media.Schema; |
|
4 |
import lombok.Data; |
|
5 |
|
|
6 |
import javax.validation.constraints.NotNull; |
|
7 |
import java.time.LocalDateTime; |
|
8 |
|
|
9 |
@Schema(description = "RPC 服务 - API 访问日志创建 Request DTO") |
|
10 |
@Data |
|
11 |
public class ApiAccessLogCreateReqDTO { |
|
12 |
|
|
13 |
@Schema(description = "链路追踪编号", example = "89aca178-a370-411c-ae02-3f0d672be4ab") |
|
14 |
private String traceId; |
|
15 |
|
|
16 |
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
|
17 |
private Long userId; |
|
18 |
@Schema(description = "用户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|
19 |
private Integer userType; |
|
20 |
@Schema(description = "应用名", requiredMode = Schema.RequiredMode.REQUIRED, example = "system-server") |
|
21 |
@NotNull(message = "应用名不能为空") |
|
22 |
private String applicationName; |
|
23 |
|
|
24 |
@Schema(description = "请求方法名", requiredMode = Schema.RequiredMode.REQUIRED, example = "GET") |
|
25 |
@NotNull(message = "http 请求方法不能为空") |
|
26 |
private String requestMethod; |
|
27 |
@Schema(description = "请求地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "/xxx/yyy") |
|
28 |
@NotNull(message = "访问地址不能为空") |
|
29 |
private String requestUrl; |
|
30 |
@Schema(description = "请求参数") |
|
31 |
private String requestParams; |
|
32 |
@Schema(description = "响应结果") |
|
33 |
private String responseBody; |
|
34 |
@Schema(description = "用户 IP", requiredMode = Schema.RequiredMode.REQUIRED, example = "127.0.0.1") |
|
35 |
@NotNull(message = "ip 不能为空") |
|
36 |
private String userIp; |
|
37 |
@Schema(description = "浏览器 UserAgent", requiredMode = Schema.RequiredMode.REQUIRED, example = "Mozilla/5.0") |
|
38 |
@NotNull(message = "User-Agent 不能为空") |
|
39 |
private String userAgent; |
|
40 |
|
|
41 |
@Schema(description = "操作模块", requiredMode = Schema.RequiredMode.REQUIRED, example = "商品模块") |
|
42 |
private String operateModule; |
|
43 |
@Schema(description = "操作名", requiredMode = Schema.RequiredMode.REQUIRED, example = "商品新增") |
|
44 |
private String operateName; |
|
45 |
@Schema(description = "操作分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|
46 |
private Integer operateType; // 参见 OperateTypeEnum 枚举 |
|
47 |
|
|
48 |
@Schema(description = "开始时间",requiredMode = Schema.RequiredMode.REQUIRED) |
|
49 |
@NotNull(message = "开始请求时间不能为空") |
|
50 |
private LocalDateTime beginTime; |
|
51 |
@Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|
52 |
@NotNull(message = "结束请求时间不能为空") |
|
53 |
private LocalDateTime endTime; |
|
54 |
@Schema(description = "执行时长,单位:毫秒", requiredMode = Schema.RequiredMode.REQUIRED) |
|
55 |
@NotNull(message = "执行时长不能为空") |
|
56 |
private Integer duration; |
|
57 |
@Schema(description = "结果码", requiredMode = Schema.RequiredMode.REQUIRED) |
|
58 |
@NotNull(message = "错误码不能为空") |
|
59 |
private Integer resultCode; |
|
60 |
@Schema(description = "结果提示") |
|
61 |
private String resultMsg; |
|
62 |
|
|
63 |
} |