package com.yonge.cooleshow.biz.dal.entity;

import io.swagger.annotations.ApiModelProperty;

import org.apache.commons.lang3.builder.ToStringBuilder;

import com.yonge.cooleshow.biz.dal.enums.MessageSendMode;
import com.yonge.cooleshow.biz.dal.enums.SendStatusEnum;
import com.yonge.cooleshow.common.entity.BaseEntity;

/**
 * 对应数据库表(sys_message):
 */
public class SysMessage extends BaseEntity {

	/** 主键 */
	private Long id;

	@ApiModelProperty("消息配置表id")
	private Long messageConfigId;

	@ApiModelProperty("TEACHER_AUTH:达人认证,MUSICIAN_AUTH:音乐人认证,PRACTICE:陪练课,LIVE:直播课,VIDEO:视频课,MUSIC_SHEET:乐谱," +
			"COURSE:课程,INCOME:收入,HOMEWORK:作业,EVALUATE:评价,GROUP_CHAT:群聊,VIP:会员,NOTICE:公告")
	private String subType;
	
	/** 标题 */
	@ApiModelProperty(value = "标题",required = false)
	private String title;
	
	/** 消息内容 */
	@ApiModelProperty(value = "消息内容",required = false)
	private String content;
	
	/** 消息类型；1，表示短信；2，表示邮件; 3,app推送消息 */
	@ApiModelProperty(value = "消息类型；1，表示短信；2，表示邮件; 3,app推送消息",required = false)
	private MessageSendMode type;
	
	/** 状态，-1,发送失败;0,待发送;1,发送中;2,发送完成 */
	@ApiModelProperty(value = "状态，-1,发送失败;0,待发送;1,发送中;2,发送完成",required = false)
	private SendStatusEnum status;
	
	/** 接收人(多个人用逗号分隔) */
	@ApiModelProperty(value = "接收人(多个人用逗号分隔)",required = false)
	private String receiver;
	
	/** 发送时间 */
	@ApiModelProperty(value = "发送时间",required = false)
	private java.util.Date sendTime;
	
	/** 错误信息 */
	@ApiModelProperty(value = "错误信息",required = false)
	private String errorMsg;
	
	/** 创建时间 */
	private java.util.Date createOn;
	
	/** 修改时间 */
	private java.util.Date modifyOn;
	
	/** 用户编号 */
	@ApiModelProperty(value = "用户编号",required = false)
	private Long userId;
	
	/** 备注 */
	@ApiModelProperty(value = "备注/url （为空就没有连接，不为空就有连接）",required = false)
	private String memo;
	
	/** 是否已读 */
	@ApiModelProperty(value = "是否已读",required = false)
	private Integer readStatus;
	
	@ApiModelProperty(value = "消息组 SYSTEM：系统消息  COURSE:课程信息 NOTICE:公告",required = false)
	private String group;

	@ApiModelProperty(value = "极光推送客户端标识",required = false)
	private String clientId;

	public String getClientId() {
		return clientId;
	}

	public void setClientId(String clientId) {
		this.clientId = clientId;
	}

	public SysMessage() {
	}

	public SysMessage(String title, String content, MessageSendMode type, String receiver, Long userId, String memo) {
		this.title = title;
		this.content = content;
		this.type = type;
		this.receiver = receiver;
		this.userId = userId;
		this.memo = memo;
	}

	public void setId(Long id){
		this.id = id;
	}
	
	public Long getId(){
		return this.id;
	}
			
	public void setTitle(String title){
		this.title = title;
	}
	
	public String getTitle(){
		return this.title;
	}
			
	public void setContent(String content){
		this.content = content;
	}
	
	public String getContent(){
		return this.content;
	}
			
	public void setReceiver(String receiver){
		this.receiver = receiver;
	}
	
	public String getReceiver(){
		return this.receiver;
	}
			
	public void setSendTime(java.util.Date sendTime){
		this.sendTime = sendTime;
	}
	
	public java.util.Date getSendTime(){
		return this.sendTime;
	}
			
	public void setErrorMsg(String errorMsg){
		this.errorMsg = errorMsg;
	}
	
	public String getErrorMsg(){
		return this.errorMsg;
	}
			
	public void setCreateOn(java.util.Date createOn){
		this.createOn = createOn;
	}
	
	public java.util.Date getCreateOn(){
		return this.createOn;
	}
			
	public void setModifyOn(java.util.Date modifyOn){
		this.modifyOn = modifyOn;
	}
	
	public java.util.Date getModifyOn(){
		return this.modifyOn;
	}
			
	public void setUserId(Long userId){
		this.userId = userId;
	}
	
	public Long getUserId(){
		return this.userId;
	}
			
	public void setMemo(String memo){
		this.memo = memo;
	}
	
	public String getMemo(){
		return this.memo;
	}

	public MessageSendMode getType() {
		return type;
	}

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

	public SendStatusEnum getStatus() {
		return status;
	}

	public void setStatus(SendStatusEnum status) {
		this.status = status;
	}

	public Integer getReadStatus() {
		return readStatus;
	}

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

	public String getGroup() {
		return group;
	}

	public void setGroup(String group) {
		this.group = group;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

	public Long getMessageConfigId() {
		return messageConfigId;
	}

	public void setMessageConfigId(Long messageConfigId) {
		this.messageConfigId = messageConfigId;
	}

	public String getSubType() {
		return subType;
	}

	public void setSubType(String subType) {
		this.subType = subType;
	}
}
