package com.ssj.bean.sys.schoolmatecircle.domain;

import com.ssj.bean.common.framework.core.domain.BaseEntity;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "ssj_user_message")
public class SSJUserMessage extends BaseEntity {
    private static final long serialVersionUID = 1L;
    private String sendUserId;//发送用户id
    private String receiveUserId;//接收用户id
    private String type;//发送类型：TEXT(文字)，PICTURE(图片)，VOICE(语音)
    private String content;//文字内容
    private String fileKey;//图片，语音资源
    private String duration;//语音长度
    private int isRead;//0 未读  1已读
    private int num;//聊天自增序号,防止时间重复分页问题
    private String timeMillis;//聊天记录时间戳毫秒
    private Date createTime;//创建时间

    @Column(name = "send_user_id")
	public String getSendUserId() {
		return sendUserId;
	}

	public void setSendUserId(String sendUserId) {
		this.sendUserId = sendUserId;
	}

	@Column(name = "receive_user_id")
	public String getReceiveUserId() {
		return receiveUserId;
	}

	public void setReceiveUserId(String receiveUserId) {
		this.receiveUserId = receiveUserId;
	}

	@Column(name = "type")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "content")
	public String getContent() {
		return content;
	}

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

	@Column(name = "file_key")
	public String getFileKey() {
		return fileKey;
	}

	public void setFileKey(String fileKey) {
		this.fileKey = fileKey;
	}

	@Column(name = "duration")
	public String getDuration() {
		return duration;
	}

	public void setDuration(String duration) {
		this.duration = duration;
	}

	@Column(name = "is_read")
	public int getIsRead() {
		return isRead;
	}

	public void setIsRead(int isRead) {
		this.isRead = isRead;
	}
	
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name = "num",insertable =false, updatable=false, nullable=false)
	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

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

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "time_millis")
	public String getTimeMillis() {
		return timeMillis;
	}

	public void setTimeMillis(String timeMillis) {
		this.timeMillis = timeMillis;
	}
}
