提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.infra.controller.admin.demo.demo01.vo; |
H |
2 |
|
|
3 |
import com.iailab.framework.excel.core.annotations.DictFormat; |
|
4 |
import com.iailab.framework.excel.core.convert.DictConvert; |
|
5 |
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
|
6 |
import com.alibaba.excel.annotation.ExcelProperty; |
|
7 |
import io.swagger.v3.oas.annotations.media.Schema; |
|
8 |
import lombok.Data; |
|
9 |
|
|
10 |
import java.time.LocalDateTime; |
|
11 |
|
|
12 |
@Schema(description = "管理后台 - 示例联系人 Response VO") |
|
13 |
@Data |
|
14 |
@ExcelIgnoreUnannotated |
|
15 |
public class Demo01ContactRespVO { |
|
16 |
|
|
17 |
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "21555") |
|
18 |
@ExcelProperty("编号") |
|
19 |
private Long id; |
|
20 |
|
|
21 |
@Schema(description = "名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") |
|
22 |
@ExcelProperty("名字") |
|
23 |
private String name; |
|
24 |
|
|
25 |
@Schema(description = "性别", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
|
26 |
@ExcelProperty(value = "性别", converter = DictConvert.class) |
|
27 |
@DictFormat("system_user_sex") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中 |
|
28 |
private Integer sex; |
|
29 |
|
|
30 |
@Schema(description = "出生年", requiredMode = Schema.RequiredMode.REQUIRED) |
|
31 |
@ExcelProperty("出生年") |
|
32 |
private LocalDateTime birthday; |
|
33 |
|
|
34 |
@Schema(description = "简介", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对") |
|
35 |
@ExcelProperty("简介") |
|
36 |
private String description; |
|
37 |
|
|
38 |
@Schema(description = "头像") |
|
39 |
@ExcelProperty("头像") |
|
40 |
private String avatar; |
|
41 |
|
|
42 |
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
|
43 |
@ExcelProperty("创建时间") |
|
44 |
private LocalDateTime createTime; |
|
45 |
|
|
46 |
} |