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)); } }