提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.system.dal.dataobject.mail; |
H |
2 |
|
|
3 |
import com.iailab.framework.common.enums.UserTypeEnum; |
|
4 |
import com.iailab.framework.mybatis.core.dataobject.BaseDO; |
|
5 |
import com.iailab.module.system.enums.mail.MailSendStatusEnum; |
|
6 |
import com.baomidou.mybatisplus.annotation.TableField; |
|
7 |
import com.baomidou.mybatisplus.annotation.TableName; |
|
8 |
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; |
|
9 |
import lombok.*; |
|
10 |
|
|
11 |
import java.io.Serializable; |
|
12 |
import java.time.LocalDateTime; |
|
13 |
import java.util.Date; |
|
14 |
import java.util.Map; |
|
15 |
|
|
16 |
/** |
|
17 |
* 邮箱日志 DO |
|
18 |
* 记录每一次邮件的发送 |
|
19 |
* |
|
20 |
* @author wangjingyi |
|
21 |
* @since 2022-03-21 |
|
22 |
*/ |
|
23 |
@TableName(value = "system_mail_log", autoResultMap = true) |
|
24 |
@Data |
|
25 |
@EqualsAndHashCode(callSuper = true) |
|
26 |
@ToString(callSuper = true) |
|
27 |
@Builder |
|
28 |
@AllArgsConstructor |
|
29 |
@NoArgsConstructor |
|
30 |
public class MailLogDO extends BaseDO implements Serializable { |
|
31 |
|
|
32 |
/** |
|
33 |
* 日志编号,自增 |
|
34 |
*/ |
|
35 |
private Long id; |
|
36 |
|
|
37 |
/** |
|
38 |
* 用户编码 |
|
39 |
*/ |
|
40 |
private Long userId; |
|
41 |
/** |
|
42 |
* 用户类型 |
|
43 |
* |
|
44 |
* 枚举 {@link UserTypeEnum} |
|
45 |
*/ |
|
46 |
private Integer userType; |
|
47 |
/** |
|
48 |
* 接收邮箱地址 |
|
49 |
*/ |
|
50 |
private String toMail; |
|
51 |
|
|
52 |
/** |
|
53 |
* 邮箱账号编号 |
|
54 |
* |
|
55 |
* 关联 {@link MailAccountDO#getId()} |
|
56 |
*/ |
|
57 |
private Long accountId; |
|
58 |
/** |
|
59 |
* 发送邮箱地址 |
|
60 |
* |
|
61 |
* 冗余 {@link MailAccountDO#getMail()} |
|
62 |
*/ |
|
63 |
private String fromMail; |
|
64 |
|
|
65 |
// ========= 模板相关字段 ========= |
|
66 |
/** |
|
67 |
* 模版编号 |
|
68 |
* |
|
69 |
* 关联 {@link MailTemplateDO#getId()} |
|
70 |
*/ |
|
71 |
private Long templateId; |
|
72 |
/** |
|
73 |
* 模版编码 |
|
74 |
* |
|
75 |
* 冗余 {@link MailTemplateDO#getCode()} |
|
76 |
*/ |
|
77 |
private String templateCode; |
|
78 |
/** |
|
79 |
* 模版发送人名称 |
|
80 |
* |
|
81 |
* 冗余 {@link MailTemplateDO#getNickname()} |
|
82 |
*/ |
|
83 |
private String templateNickname; |
|
84 |
/** |
|
85 |
* 模版标题 |
|
86 |
*/ |
|
87 |
private String templateTitle; |
|
88 |
/** |
|
89 |
* 模版内容 |
|
90 |
* |
|
91 |
* 基于 {@link MailTemplateDO#getContent()} 格式化后的内容 |
|
92 |
*/ |
|
93 |
private String templateContent; |
|
94 |
/** |
|
95 |
* 模版参数 |
|
96 |
* |
|
97 |
* 基于 {@link MailTemplateDO#getParams()} 输入后的参数 |
|
98 |
*/ |
|
99 |
@TableField(typeHandler = JacksonTypeHandler.class) |
|
100 |
private Map<String, Object> templateParams; |
|
101 |
|
|
102 |
// ========= 发送相关字段 ========= |
|
103 |
/** |
|
104 |
* 发送状态 |
|
105 |
* |
|
106 |
* 枚举 {@link MailSendStatusEnum} |
|
107 |
*/ |
|
108 |
private Integer sendStatus; |
|
109 |
/** |
|
110 |
* 发送时间 |
|
111 |
*/ |
|
112 |
private LocalDateTime sendTime; |
|
113 |
/** |
|
114 |
* 发送返回的消息 ID |
|
115 |
*/ |
|
116 |
private String sendMessageId; |
|
117 |
/** |
|
118 |
* 发送异常 |
|
119 |
*/ |
|
120 |
private String sendException; |
|
121 |
|
|
122 |
} |