提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.system.api.logger.dto; |
H |
2 |
|
|
3 |
import io.swagger.v3.oas.annotations.media.Schema; |
|
4 |
import lombok.Data; |
|
5 |
|
|
6 |
import javax.validation.constraints.NotBlank; |
|
7 |
import javax.validation.constraints.NotEmpty; |
|
8 |
import javax.validation.constraints.NotNull; |
|
9 |
import javax.validation.constraints.Size; |
|
10 |
|
|
11 |
@Schema(description = "RPC 服务 - 登录日志创建 Request DTO") |
|
12 |
@Data |
|
13 |
public class LoginLogCreateReqDTO { |
|
14 |
|
|
15 |
@Schema(description = "日志类型,参见 LoginLogTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1" ) |
|
16 |
@NotNull(message = "日志类型不能为空") |
|
17 |
private Integer logType; |
|
18 |
|
|
19 |
@Schema(description = "链路追踪编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "89aca178-a370-411c-ae02-3f0d672be4ab") |
|
20 |
private String traceId; |
|
21 |
|
|
22 |
@Schema(description = "用户编号", example = "666") |
|
23 |
private Long userId; |
|
24 |
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "2" ) |
|
25 |
@NotNull(message = "用户类型不能为空") |
|
26 |
private Integer userType; |
|
27 |
@Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "iailab") |
|
28 |
@NotBlank(message = "用户账号不能为空") |
|
29 |
@Size(max = 30, message = "用户账号长度不能超过30个字符") |
|
30 |
private String username; |
|
31 |
|
|
32 |
@Schema(description = "登录结果,参见 LoginResultEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|
33 |
@NotNull(message = "登录结果不能为空") |
|
34 |
private Integer result; |
|
35 |
|
|
36 |
@Schema(description = "用户 IP", requiredMode = Schema.RequiredMode.REQUIRED, example = "127.0.0.1") |
|
37 |
@NotEmpty(message = "用户 IP 不能为空") |
|
38 |
private String userIp; |
|
39 |
|
|
40 |
@Schema(description = "浏览器 UserAgent", requiredMode = Schema.RequiredMode.REQUIRED, example = "Mozilla/5.0") |
|
41 |
private String userAgent; |
|
42 |
|
|
43 |
} |