提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.system.api.oauth2.dto; |
H |
2 |
|
|
3 |
import com.iailab.framework.common.enums.UserTypeEnum; |
|
4 |
import com.iailab.framework.common.validation.InEnum; |
|
5 |
import io.swagger.v3.oas.annotations.media.Schema; |
|
6 |
import lombok.Data; |
|
7 |
|
|
8 |
import javax.validation.constraints.NotNull; |
|
9 |
import java.io.Serializable; |
|
10 |
import java.util.List; |
|
11 |
|
|
12 |
@Schema(description = "RPC 服务 - OAuth2 访问令牌创建 Request DTO") |
|
13 |
@Data |
|
14 |
public class OAuth2AccessTokenCreateReqDTO implements Serializable { |
|
15 |
|
|
16 |
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") |
|
17 |
@NotNull(message = "用户编号不能为空") |
|
18 |
private Long userId; |
|
19 |
|
|
20 |
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|
21 |
@NotNull(message = "用户类型不能为空") |
|
22 |
@InEnum(value = UserTypeEnum.class, message = "用户类型必须是 {value}") |
|
23 |
private Integer userType; |
|
24 |
|
|
25 |
@Schema(description = "客户端编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "iailabyuanma") |
|
26 |
@NotNull(message = "客户端编号不能为空") |
|
27 |
private String clientId; |
|
28 |
|
|
29 |
@Schema(description = "授权范围的数组", example = "user_info") |
|
30 |
private List<String> scopes; |
|
31 |
|
|
32 |
} |