xin
2025-10-17 ab0637e981ab4c85120ccde35ee24ec4abbe3e24
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
package com.oying.modules.message.domain;
 
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.oying.base.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
 
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.sql.Timestamp;
 
/**
 * @author 李萌
 * @description /
 * @date 2025-07-25
 **/
@Data
@TableName("mes_msg_record")
public class MesMsgRecord extends BaseEntity implements Serializable {
 
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键")
    private Long id;
 
    @ApiModelProperty(value = "模板ID 可无")
    private Integer templateId;
 
    @ApiModelProperty(value = "接收人ID")
    private String receiverId;
 
    @ApiModelProperty(value = "1=买家 2=商户 3=骑手")
    private Integer platform;
 
    @ApiModelProperty(value = "同模板type")
    private Integer msgType;
//    @NotNull
//    @ApiModelProperty(value = "同模板type")
//    private MesTypeEnum msgType;
 
 
    @ApiModelProperty(value = "最终标题")
    private String title;
 
    @ApiModelProperty(value = "最终内容")
    private String content;
 
    @ApiModelProperty(value = "最终内容key")
    private String contentKey;
 
    @ApiModelProperty(value = "业务ID 例如订单ID")
    private Long bizId;
 
    @ApiModelProperty(value = "业务类型 ORDER/EVALUATION 等")
    private String bizType;
 
    @ApiModelProperty(value = "已读 0=未读 1=已读")
    private Integer isRead;
 
    @ApiModelProperty(value = "阅读时间")
    private Timestamp readTime;
 
    @ApiModelProperty(value = "扩展字段 存跳转链接等")
    private String extra;
 
    // 新增字段
    @ApiModelProperty(value = "订单ID")
    private Long orderId;
 
    @ApiModelProperty(value = "买家用户ID")
    private String buyerId;
 
    @ApiModelProperty(value = "买家用户名字")
    private String buyerName;
 
    @ApiModelProperty(value = "订单编号 冗余字段")
    private String orderNo;
 
    @ApiModelProperty(value = "店铺ID 冗余字段")
    private Long shopId;
 
    @ApiModelProperty(value = "店铺名称 冗余字段")
    private String shopName;
 
    @ApiModelProperty(value = "骑手ID")
    private String riderId;
 
    @ApiModelProperty(value = "骑手姓名 冗余字段")
    private String riderName;
 
    public void copy(MesMsgRecord source) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
    }
}