FollowAttachmentDTO.java
1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package cn.fw.valhalla.domain.dto;
import cn.fw.common.validator.EnumValue;
import cn.fw.valhalla.domain.enums.AttTypeEnum;
import cn.fw.valhalla.domain.enums.FeedbackTypeEnum;
import cn.fw.valhalla.domain.enums.FollowTypeEnum;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Objects;
/**
* @author : kurisu
* @className : FollowAttachmentDTO
* @description : 跟进附件
* @date: 2020-08-17 17:25
*/
@Data
@ToString
public class FollowAttachmentDTO {
private Long id;
/**
* 跟进任务id
*/
private Long taskId;
/**
* 跟进记录id
*/
@NotNull(message = "跟进记录id不能为空")
private Long recordId;
/**
* 附件类型
*/
@EnumValue(enumClass = AttTypeEnum.class, message = "附件类型不正确")
private Integer attType;
/**
* 跟进类型
*/
@EnumValue(enumClass = FollowTypeEnum.class, message = "跟进类型不正确")
private Integer followType;
/**
* 附件ids
*/
@NotBlank(message = "附件不能为空")
private String attachments;
/**
* 反馈类型
*/
@EnumValue(enumClass = FeedbackTypeEnum.class, message = "反馈类型不正确")
@NotNull(message = "反馈类型不能为空")
private Integer feedbackType;
/**
* 描述
*/
private String describes;
public AttTypeEnum getAttTypeEnum() {
return AttTypeEnum.ofValue(attType);
}
public FollowTypeEnum getFollowTypeEnum() {
return FollowTypeEnum.ofValue(followType);
}
public FeedbackTypeEnum getFeedbackTypeEnum() {
if (Objects.isNull(feedbackType)) {
return null;
}
return FeedbackTypeEnum.ofValue(feedbackType);
}
}