package com.ym.mec.education.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 消息表
 * </p>
 *
 * @author lemeng
 * @since 2019-09-25
 */
@TableName("sys_message")
public class SysMessage extends Model<SysMessage> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id_", type = IdType.AUTO)
    private Long id;
    /**
     * 标题
     */
    @TableField("title_")
    private String title;
    /**
     * 消息内容
     */
    @TableField("content_")
    private String content;
    /**
     * 消息类型；1，表示短信；2，表示邮件; 3,app推送消息
     */
    @TableField("type_")
    private Integer type;
    /**
     * 状态，1,发送失败;2,待发送;3,发送中;4,发送完成
     */
    @TableField("status_")
    private Integer status;
    /**
     * 接收人(多个人用逗号分隔)
     */
    @TableField("receiver_")
    private String receiver;
    /**
     * 发送时间
     */
    @TableField("send_time_")
    private Date sendTime;
    /**
     * 错误信息
     */
    @TableField("error_msg_")
    private String errorMsg;
    /**
     * 创建时间
     */
    @TableField("create_on_")
    private Date createOn;
    /**
     * 修改时间
     */
    @TableField("modify_on_")
    private Date modifyOn;
    /**
     * 用户编号
     */
    @TableField("user_id_")
    private Long userId;
    /**
     * 备注
     */
    @TableField("memo_")
    private String memo;
    /**
     * 是否已读
     */
    @TableField("read_status_")
    private Integer readStatus;


    public Long getId() {
        return id;
    }

    public SysMessage setId(Long id) {
        this.id = id;
        return this;
    }

    public String getTitle() {
        return title;
    }

    public SysMessage setTitle(String title) {
        this.title = title;
        return this;
    }

    public String getContent() {
        return content;
    }

    public SysMessage setContent(String content) {
        this.content = content;
        return this;
    }

    public Integer getType() {
        return type;
    }

    public SysMessage setType(Integer type) {
        this.type = type;
        return this;
    }

    public Integer getStatus() {
        return status;
    }

    public SysMessage setStatus(Integer status) {
        this.status = status;
        return this;
    }

    public String getReceiver() {
        return receiver;
    }

    public SysMessage setReceiver(String receiver) {
        this.receiver = receiver;
        return this;
    }

    public Date getSendTime() {
        return sendTime;
    }

    public SysMessage setSendTime(Date sendTime) {
        this.sendTime = sendTime;
        return this;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public SysMessage setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
        return this;
    }

    public Date getCreateOn() {
        return createOn;
    }

    public SysMessage setCreateOn(Date createOn) {
        this.createOn = createOn;
        return this;
    }

    public Date getModifyOn() {
        return modifyOn;
    }

    public SysMessage setModifyOn(Date modifyOn) {
        this.modifyOn = modifyOn;
        return this;
    }

    public Long getUserId() {
        return userId;
    }

    public SysMessage setUserId(Long userId) {
        this.userId = userId;
        return this;
    }

    public String getMemo() {
        return memo;
    }

    public SysMessage setMemo(String memo) {
        this.memo = memo;
        return this;
    }

    public Integer getReadStatus() {
        return readStatus;
    }

    public SysMessage setReadStatus(Integer readStatus) {
        this.readStatus = readStatus;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "SysMessage{" +
        ", id=" + id +
        ", title=" + title +
        ", content=" + content +
        ", type=" + type +
        ", status=" + status +
        ", receiver=" + receiver +
        ", sendTime=" + sendTime +
        ", errorMsg=" + errorMsg +
        ", createOn=" + createOn +
        ", modifyOn=" + modifyOn +
        ", userId=" + userId +
        ", memo=" + memo +
        ", readStatus=" + readStatus +
        "}";
    }
}
