2026-06-30 24681c81c09022f584a57006f2534b5f74723414
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
package cn.iocoder.yudao.module.im.dal.dataobject.channel;
 
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.module.im.dal.dataobject.message.ImChannelMessageDO;
import cn.iocoder.yudao.module.im.enums.channel.ImChannelMaterialTypeEnum;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
 
/**
 * IM 频道素材 DO
 * <p>
 * 业务语义:
 * - 运营素材库,可被反复推送
 * - 一条素材 1:N 关联多条 {@link ImChannelMessageDO}
 * - {@link #content} 富文本仅在素材详情接口按需返回,推送 payload 不带,避免压爆 WebSocket 通道
 *
 * @author 芋道源码
 */
@TableName("im_channel_material")
@KeySequence("im_channel_material_seq")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ImChannelMaterialDO extends BaseDO {
 
    /**
     * 编号
     */
    @TableId
    private Long id;
    /**
     * 频道编号
     * <p>
     * 关联 {@link ImChannelDO#getId()}
     */
    private Long channelId;
    /**
     * 素材内容类型
     * <p>
     * 枚举 {@link ImChannelMaterialTypeEnum}
     */
    private Integer type;
    /**
     * 标题
     */
    private String title;
    /**
     * 封面图
     */
    private String coverUrl;
    /**
     * 摘要
     */
    private String summary;
    /**
     * 富文本 HTML;在 {@link ImChannelMaterialTypeEnum#CONTENT} 使用
     */
    private String content;
    /**
     * 跳转链接;在 {@link ImChannelMaterialTypeEnum#LINK} 使用
     */
    private String url;
 
}