Blame view

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