|
17 | 17 |
|
18 | 18 | package org.apache.inlong.manager.common.pojo.user;
|
19 | 19 |
|
| 20 | +import com.fasterxml.jackson.annotation.JsonFormat; |
20 | 21 | import io.swagger.annotations.ApiModel;
|
21 | 22 | import io.swagger.annotations.ApiModelProperty;
|
22 |
| -import lombok.AllArgsConstructor; |
23 |
| -import lombok.Builder; |
24 | 23 | import lombok.Data;
|
25 |
| -import lombok.NoArgsConstructor; |
26 |
| -import org.apache.inlong.manager.common.enums.UserTypeEnum; |
27 |
| -import org.apache.inlong.manager.common.validation.InEnumInt; |
28 | 24 |
|
29 | 25 | import javax.validation.constraints.Min;
|
30 |
| -import javax.validation.constraints.NotBlank; |
31 | 26 | import javax.validation.constraints.NotNull;
|
| 27 | +import java.util.Date; |
| 28 | +import java.util.Set; |
32 | 29 |
|
33 | 30 | /**
|
34 |
| - * User info, including username, password, etc. |
| 31 | + * User info |
35 | 32 | */
|
36 | 33 | @Data
|
37 |
| -@Builder |
38 |
| -@NoArgsConstructor |
39 |
| -@AllArgsConstructor |
40 | 34 | @ApiModel("User info")
|
41 | 35 | public class UserInfo {
|
42 | 36 |
|
| 37 | + @ApiModelProperty(value = "Primary key") |
43 | 38 | private Integer id;
|
44 | 39 |
|
45 |
| - /** |
46 |
| - * User type {@link UserTypeEnum} |
47 |
| - */ |
48 |
| - @NotNull(message = "type cannot be null") |
49 |
| - @InEnumInt(UserTypeEnum.class) |
50 |
| - @ApiModelProperty(value = "type: 0 - manager, 1 - operator", required = true) |
51 |
| - private Integer type; |
| 40 | + @ApiModelProperty(value = "Username") |
| 41 | + private String name; |
52 | 42 |
|
53 |
| - @NotBlank(message = "username cannot be blank") |
54 |
| - @ApiModelProperty(value = "username", required = true) |
55 |
| - private String username; |
56 |
| - |
57 |
| - @ApiModelProperty(value = "password") |
| 43 | + @ApiModelProperty(value = "User password") |
58 | 44 | private String password;
|
59 | 45 |
|
60 |
| - @ApiModelProperty(value = "newPassword") |
61 |
| - private String newPassword; |
62 |
| - |
63 |
| - @ApiModelProperty("secret key") |
| 46 | + @ApiModelProperty("Secret key") |
64 | 47 | private String secretKey;
|
65 | 48 |
|
66 |
| - @ApiModelProperty("public key") |
| 49 | + @ApiModelProperty("Public key") |
67 | 50 | private String publicKey;
|
68 | 51 |
|
69 |
| - @ApiModelProperty("private key") |
| 52 | + @ApiModelProperty("Private key") |
70 | 53 | private String privateKey;
|
71 | 54 |
|
| 55 | + @ApiModelProperty("Encryption key version") |
| 56 | + private Integer encryptVersion; |
| 57 | + |
| 58 | + @ApiModelProperty(value = "Account type: 0 - manager, 1 - operator", required = true) |
| 59 | + private Integer accountType; |
| 60 | + |
72 | 61 | @Min(1)
|
73 | 62 | @NotNull(message = "validDays cannot be null")
|
74 |
| - @ApiModelProperty(value = "valid days", required = true) |
| 63 | + @ApiModelProperty(value = "Valid days", required = true) |
75 | 64 | private Integer validDays;
|
76 | 65 |
|
| 66 | + @ApiModelProperty(value = "Name of creator") |
| 67 | + private String creator; |
| 68 | + |
| 69 | + @ApiModelProperty(value = "Name of modifier") |
| 70 | + private String modifier; |
| 71 | + |
| 72 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| 73 | + private Date createTime; |
| 74 | + |
| 75 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| 76 | + private Date modifyTime; |
| 77 | + |
| 78 | + @ApiModelProperty(value = "User status, valid or not") |
| 79 | + private String status; |
| 80 | + |
| 81 | + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| 82 | + private Date dueDate; |
| 83 | + |
| 84 | + @ApiModelProperty(value = "User roles") |
| 85 | + private Set<String> roles; |
| 86 | + |
77 | 87 | @ApiModelProperty(value = "Version number")
|
78 | 88 | private Integer version;
|
79 | 89 |
|
|
0 commit comments