| | |
| | | |
| | | import cn.iocoder.yudao.framework.common.validation.InEnum; |
| | | import cn.iocoder.yudao.module.wxcp.enums.activity.WxCpPushScopeEnum; |
| | | import cn.iocoder.yudao.module.wxcp.enums.notice.WxCpNoticeTypeEnum; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import jakarta.validation.constraints.Size; |
| | |
| | | @Size(max = 128, message = "通知标题长度不能超过 128 个字符") |
| | | private String title; |
| | | |
| | | @Schema(description = "通知正文", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotEmpty(message = "通知正文不能为空") |
| | | @Schema(description = "通知正文;纯文本通知必填,其它类型作为补充说明") |
| | | @Size(max = 10000, message = "通知正文长度不能超过 10000 个字符") |
| | | private String content; |
| | | |
| | | @Schema(description = "通知模板类型:1-纯文本 2-图文卡片(填报/链接) 3-文件通知 4-图文消息", example = "1") |
| | | @InEnum(WxCpNoticeTypeEnum.class) |
| | | private Integer noticeType; |
| | | |
| | | @Schema(description = "摘要(图文卡片/图文消息使用)", example = "请于本周五前完成填报") |
| | | @Size(max = 512, message = "摘要长度不能超过 512 个字符") |
| | | private String summary; |
| | | |
| | | @Schema(description = "跳转链接(填报、查看详情等)", example = "https://example.com/form/1") |
| | | @Size(max = 1024, message = "跳转链接长度不能超过 1024 个字符") |
| | | private String linkUrl; |
| | | |
| | | @Schema(description = "链接按钮文案", example = "去填报") |
| | | @Size(max = 32, message = "按钮文案长度不能超过 32 个字符") |
| | | private String linkBtnText; |
| | | |
| | | @Schema(description = "图文消息封面图地址", example = "https://example.com/cover.png") |
| | | @Size(max = 1024, message = "封面图地址长度不能超过 1024 个字符") |
| | | private String coverUrl; |
| | | |
| | | @Schema(description = "文件通知的附件 Blob ID(先调用 /system/storage-blob/upload 上传)", example = "1024") |
| | | private Long fileBlobId; |
| | | |
| | | @Schema(description = "文件通知的附件文件名", example = "关于开展XX工作的通知.pdf") |
| | | @Size(max = 255, message = "文件名长度不能超过 255 个字符") |
| | | private String fileName; |
| | | |
| | | @Schema(description = "推送范围(选填,不传默认全员);推送时仍可在推送弹窗里重新选择", example = "0") |
| | | @InEnum(WxCpPushScopeEnum.class) |
| | | private Integer pushScope; |