package com.rongyichuang.message.entity;
|
|
import com.rongyichuang.common.entity.BaseEntity;
|
import jakarta.persistence.*;
|
|
/**
|
* 消息实体类
|
* 对应数据库表:t_msg
|
*/
|
@Entity
|
@Table(name = "t_msg")
|
public class Message extends BaseEntity {
|
|
/**
|
* 目标类型
|
*/
|
@Column(name = "target_type", nullable = false)
|
private Integer targetType;
|
|
/**
|
* 目标ID
|
*/
|
@Column(name = "target_id", nullable = false)
|
private Integer targetId;
|
|
/**
|
* 学员ID
|
*/
|
@Column(name = "player_id", nullable = false)
|
private Integer playerId;
|
|
/**
|
* 用户ID
|
*/
|
@Column(name = "user_id", nullable = false)
|
private Integer userId;
|
|
/**
|
* 消息内容
|
*/
|
@Column(name = "content", length = 200, nullable = false)
|
private String content;
|
|
/**
|
* 模板内容
|
*/
|
@Column(name = "template_content", length = 200)
|
private String templateContent;
|
|
/**
|
* 微信消息发送成功标志
|
*/
|
@Column(name = "wx_msg_success", nullable = false)
|
private Boolean wxMsgSuccess;
|
|
/**
|
* 微信消息错误次数
|
*/
|
@Column(name = "wx_msg_err_count", nullable = false)
|
private Integer wxMsgErrCount = 0;
|
|
/**
|
* 微信消息最后错误信息
|
*/
|
@Column(name = "wx_msg_last_err", length = 255)
|
private String wxMsgLastErr;
|
|
/**
|
* 状态:0-暂时不发布,1-可以发布,2-已经发布
|
*/
|
@Column(name = "state", nullable = false)
|
private Integer state;
|
|
// Getters and Setters
|
public Integer getTargetType() {
|
return targetType;
|
}
|
|
public void setTargetType(Integer targetType) {
|
this.targetType = targetType;
|
}
|
|
public Integer getTargetId() {
|
return targetId;
|
}
|
|
public void setTargetId(Integer targetId) {
|
this.targetId = targetId;
|
}
|
|
public Integer getPlayerId() {
|
return playerId;
|
}
|
|
public void setPlayerId(Integer playerId) {
|
this.playerId = playerId;
|
}
|
|
public Integer getUserId() {
|
return userId;
|
}
|
|
public void setUserId(Integer userId) {
|
this.userId = userId;
|
}
|
|
public String getContent() {
|
return content;
|
}
|
|
public void setContent(String content) {
|
this.content = content;
|
}
|
|
public String getTemplateContent() {
|
return templateContent;
|
}
|
|
public void setTemplateContent(String templateContent) {
|
this.templateContent = templateContent;
|
}
|
|
public Boolean getWxMsgSuccess() {
|
return wxMsgSuccess;
|
}
|
|
public void setWxMsgSuccess(Boolean wxMsgSuccess) {
|
this.wxMsgSuccess = wxMsgSuccess;
|
}
|
|
public Integer getWxMsgErrCount() {
|
return wxMsgErrCount;
|
}
|
|
public void setWxMsgErrCount(Integer wxMsgErrCount) {
|
this.wxMsgErrCount = wxMsgErrCount;
|
}
|
|
public String getWxMsgLastErr() {
|
return wxMsgLastErr;
|
}
|
|
public void setWxMsgLastErr(String wxMsgLastErr) {
|
this.wxMsgLastErr = wxMsgLastErr;
|
}
|
|
public Integer getState() {
|
return state;
|
}
|
|
public void setState(Integer state) {
|
this.state = state;
|
}
|
}
|