package com.yihu.jw.entity.hospital.message;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author zmk
 * @vsrsion 1.0
 * Created at 2019/11/13
 */
@Entity
@Table(name = "base_system_message")
public class SystemMessageDO extends UuidIdentityEntity {

    /**
     *消息类型 上门服务400开头，生活照料500开头 ,安防监控600开头, 上门辅导700开头,紧急救助800开头
     * 人文关怀系统消息 41
     * 体征设备测量系统消息 42
     * 设备离线系统消息 43
     * 家属紧急预警系统消息 50
     * 新生儿在线咨询 850
     * 老人在线咨询 851
     * 老人健康咨询 852
     */
    private String type;
    /**
     *消息标题
     */
    private String title;
    /**
     *消息发送者
     */
    private String sender;
    /**
     *发送者名称
     */
    private String senderName;
    /**
     *消息接收者
     */
    private String receiver;
    /**
     *接收者名称
     */
    private String receiverName;
    /**
     *业务关联code
     */
    private String relationCode;
    /**
     *拓展json字段
     */
    private String data;
    /**
     *是否已读
     */
    private String isRead;
    /**
     *是否删除
     */
    private String del;
    private String over;//是否操作结束 是否操作结束 1否，0是
    /**
     *已读时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date readTime;
    /**
     *创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date createTime;

    private String content;
    private Integer state;
    private Integer readonly;
    private String reason;
    private String code;
    private String senderPhoto;
    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
    @Column(name = "state")
    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }
    @Column(name = "readonly")
    public Integer getReadonly() {
        return readonly;
    }

    public void setReadonly(Integer readonly) {
        this.readonly = readonly;
    }
    @Column(name = "reason")
    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }
    @Column(name = "sender_photo")
    public String getSenderPhoto() {
        return senderPhoto;
    }

    public void setSenderPhoto(String senderPhoto) {
        this.senderPhoto = senderPhoto;
    }

    @Column(name = "type")
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }

    @Column(name = "title")
    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }

    @Column(name = "sender")
    public String getSender() {
        return sender;
    }
    public void setSender(String sender) {
        this.sender = sender;
    }

    @Column(name = "sender_name")
    public String getSenderName() {
        return senderName;
    }
    public void setSenderName(String senderName) {
        this.senderName = senderName;
    }

    @Column(name = "receiver")
    public String getReceiver() {
        return receiver;
    }
    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    @Column(name = "receiver_name")
    public String getReceiverName() {
        return receiverName;
    }
    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }

    @Column(name = "relation_code")
    public String getRelationCode() {
        return relationCode;
    }
    public void setRelationCode(String relationCode) {
        this.relationCode = relationCode;
    }

    @Column(name = "data")
    public String getData() {
        return data;
    }
    public void setData(String data) {
        this.data = data;
    }

    @Column(name = "is_read")
    public String getIsRead() {
        return isRead;
    }
    public void setIsRead(String isRead) {
        this.isRead = isRead;
    }

    @Column(name = "del")
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }

    @Column(name = "read_time")
    public Date getReadTime() {
        return readTime;
    }
    public void setReadTime(Date readTime) {
        this.readTime = readTime;
    }

    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Column(name = "over")
    public String getOver() {
        return over;
    }

    public void setOver(String over) {
        this.over = over;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
