package com.hotent.portal.model;


import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang.builder.ToStringBuilder;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hotent.base.entity.AutoFillModel;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;


/**
 * 系统信息实体对象
 * 
 * @company 广州宏天软件股份有限公司
 * @author hugh
 * @email zxh@jee-soft.cn
 * @date 2014-11-18 09:03:31
 */
@ApiModel(description="系统信息实体对象")
@TableName("portal_sys_msg")
public class SysMessage extends AutoFillModel<SysMessage>{

	private static final long serialVersionUID = 1L;
	
	public final static Short iS_REPLY_YES = 1; //可以回复
	public final static Short iS_REPLY_NO= 0;   //不可以回复

	public final static Short iS_PUBLIC_YES= 1;   //是公告
	public final static Short iS_PUBLIC_NO= 0;   //不是公告

	public final static Short IS_DELE_NO = 0;   //0:未除
	public final static Short IS_DELE_YES = 1;   //1:已删

	//发帖来源类型 -1:平台 0:PC应用 1:移动应用 2:流程
	public final static String OWNER_SOURCE_PLATFORM = "-1";
	public final static String OWNER_SOURCE_APP_PC = "0";
	public final static String OWNER_SOURCE_APP_MOBILE = "1";
	public final static String OWNER_SOURCE_FLOW = "2";

	//消息类型 0:固定内容 1:跳转地址 2:资讯 3:应用 4:流程 5:移动端应用 6:模板消息
	public final static String MESSAGE_SOURCE_TYPE_CONTENT = "0"; //0:固定内容
	public final static String MESSAGE_SOURCE_TYPE_URL = "1"; //1:跳转地址
	public final static String MESSAGE_SOURCE_TYPE_NEWS = "2"; //2:资讯
	public final static String MESSAGE_SOURCE_TYPE_APP_PC = "3"; //3:应用
	public final static String MESSAGE_SOURCE_TYPE_FLOW = "4"; //4:流程
	public final static String MESSAGE_SOURCE_TYPE_APP_MOBILE = "5"; //5:移动端应用
	public final static String MESSAGE_SOURCE_TYPE_TEMPLATE = "6"; //6:模板消息

	//消息标志 sys:系统消息 user:个人消息
	public final static String MESSAGE_TAG_SYS = "sys"; //sys:系统消息
	public final static String MESSAGE_TAG_USER = "user"; //user:个人消息

	//是否支持手机表单 0:跳转全兼容(默认)  1:仅支持pc端跳转 2:仅支持移动端跳转 3:不跳转
	public final static String SUPPORT_MOBILE_ALL = "0"; //0:跳转全兼容(默认)
	public final static String SUPPORT_MOBILE_PC = "1"; //1:仅支持pc端跳转
	public final static String SUPPORT_MOBILE_MOBILE = "2"; //2:仅支持移动端跳转
	public final static String SUPPORT_MOBILE_NO = "3"; //3:不跳转

	public final static String TYPE_BULLETIN="bulletin";//公告类型
	
	@ApiModelProperty(name="id", notes="主键")
	@TableId("id_")
	protected String id;
	
	@ApiModelProperty(name="subject", notes="主题")
	@TableField("subject_")
	protected String subject;

	@ApiModelProperty(name="description", notes="主题摘要")
	@TableField("description_")
	protected String description;
	
	@ApiModelProperty(name="ownerId", notes="发帖人ID")
	@TableField("owner_id_")
	protected String ownerId;
	
	@ApiModelProperty(name="owner", notes="发帖人")
	@TableField("owner_")
	protected String owner; 
	
	@ApiModelProperty(name="messageType", notes="消息类型")
	@TableField("message_type_")
	protected String messageType;

	@ApiModelProperty(name="messageTag", notes="消息标志 sys:系统消息 user:个人消息")
	@TableField("message_tag_")
	protected String messageTag;

	@ApiModelProperty(name="canReply", notes="是否可以回复")
	@TableField("can_reply_")
	protected Short canReply; 
	
	@ApiModelProperty(name="isPublic", notes="是否公告")
	@TableField("is_public_")
	protected Short isPublic;
	
	@ApiModelProperty(name="content", notes="内容")
	@TableField("content_")
	protected String content;
	
	@ApiModelProperty(name="fileMsg", notes="附件信息")
	@TableField("file_msg_")
	protected String fileMsg;
	
	@ApiModelProperty(name="receiverName", notes="接收人名称")
	@TableField("receiver_name_")
	protected String receiverName;

	@ApiModelProperty(name="sysCode", notes="外部系统编码")
	@TableField("sys_code_")
	protected String sysCode;

	@ApiModelProperty(name="messageSourceType", notes="消息类型 0:固定内容 1:跳转地址 2:资讯 3:应用 4:流程 5:移动端应用 6:模板消息")
	@TableField("message_source_type_")
	protected String messageSourceType;

	@ApiModelProperty(name="messageUrl", notes="消息跳转地址")
	@TableField("message_url_")
	protected String messageUrl;

	@ApiModelProperty(name="supportMobile", notes="是否支持手机表单 0:跳转全兼容(默认)  1:仅支持pc端跳转 2:仅支持移动端跳转 3:不跳转")
	@TableField("support_mobile_")
	protected String supportMobile;

	@ApiModelProperty(name="messageParams", notes="扩展属性")
	@TableField("message_params_")
	protected String messageParams;

	@ApiModelProperty(name="resourceId", notes="资讯id")
	@TableField("resource_id_")
	protected String resourceId;

	@ApiModelProperty(name="resourceName", notes="资讯名称")
	@TableField(exist = false)
	protected String resourceName;

	@ApiModelProperty(name="appId", notes="应用id")
	@TableField("app_id_")
	protected String appId;

	@ApiModelProperty(name="appName", notes="应用名称")
	@TableField(exist = false)
	protected String appName;

	@ApiModelProperty(name="appMobileId", notes="移动应用id")
	@TableField("app_mobile_id_")
	protected String appMobileId;

	@ApiModelProperty(name="appMobileName", notes="移动应用名称")
	@TableField(exist = false)
	protected String appMobileName;

	@ApiModelProperty(name="flowId", notes="流程id")
	@TableField("flow_id_")
	protected String flowId;

	@ApiModelProperty(name="flowName", notes="流程名称")
	@TableField(exist = false)
	protected String flowName;

	@ApiModelProperty(name="templateId", notes="模板消息id")
	@TableField("template_id_")
	protected String templateId;

	@ApiModelProperty(name="templateData", notes="模板消息内容")
	@TableField("template_data_")
	protected String templateData;

	@ApiModelProperty(name="templateName", notes="模板消息名称")
	@TableField(exist = false)
	protected String templateName;

	@ApiModelProperty(name="isDele", notes="是否删除：0未除、1已删")
	@TableField("is_dele_")
	protected Short isDele = 0;

	@ApiModelProperty(name="ownerSource", notes="发帖来源类型 -1:平台 0:PC应用 1:移动应用 2:流程")
	@TableField("owner_source_")
	protected String ownerSource;

	@ApiModelProperty(name="ownerSourceId", notes="发帖来源_关联应用ID")
	@TableField("owner_source_id_")
	protected String ownerSourceId;

	@ApiModelProperty(name="ownerSourceName", notes="发帖来源_关联应用名称")
	@TableField(exist = false)
	protected String ownerSourceName;

	@ApiModelProperty(name="ownerSourceIcon", notes="发帖来源_关联应用图标")
	@TableField(exist = false)
	protected String ownerSourceIcon;

	@ApiModelProperty(name="ownerSourceIconColor", notes="发帖来源_关联应用图标颜色")
	@TableField(exist = false)
	protected String ownerSourceIconColor;

	@ApiModelProperty(name="ownerSourceCurAppCallback", notes="发帖来源_关联应用回调地址")
	@TableField(exist = false)
	protected String ownerSourceCurAppCallback;

	/*非数据库字段*/
	@ApiModelProperty(name="receiveTime", notes="阅读时间")
	@TableField(exist = false)
	protected LocalDateTime receiveTime;
	
	@ApiModelProperty(name="receiverId", notes="接收人id")
	@TableField(exist = false)
	protected String receiverId;
	
	@ApiModelProperty(name="receiverOrgName", notes="接受组织名称")
	@TableField(exist = false)
	protected String receiverOrgName;
	
	@ApiModelProperty(name="receiverOrgId", notes="接受组织Id")
	@TableField(exist = false)
	protected String receiverOrgId;
	
	@ApiModelProperty(name="rid", notes="收信id")
	@TableField(exist = false)
	protected String rid;
	
	@ApiModelProperty(name="detailUrl", notes="详情地址")
	@TableField(exist = false)
	protected String detailUrl;	
	
	/**
	 * 设置主键
	 * @param id 主键
	 */
	public void setId(String id) 
	{
		this.id = id;
	}
	
	/**
	 * 返回 主键
	 * @return
	 */
	public String getId() 
	{
		return this.id;
	}
	
	/**
	 * 设置主题
	 * @param subject 主题
	 */
	public void setSubject(String subject) 
	{
		this.subject = subject;
	}
	
	/**
	 * 返回 主题
	 * @return
	 */
	public String getSubject() 
	{
		return this.subject;
	}
	
	/**
	 * 设置发帖人ID
	 * @param ownerId 发帖人ID
	 */
	public void setOwnerId(String ownerId)
	{
		this.ownerId = ownerId;
	}
	
	/**
	 * 返回 发帖人ID
	 * @return
	 */
	public String getOwnerId() 
	{
		return this.ownerId;
	}
	
	/**
	 * 设置 发帖人
	 * @param owner  发帖人
	 */
	public void setOwner(String owner) 
	{
		this.owner = owner;
	}
	
	/**
	 * 返回 发帖人
	 * @return
	 */
	public String getOwner() 
	{
		return this.owner;
	}
	
	/**
	 * 设置消息类型
	 * @param messageType 消息类型
	 */
	public void setMessageType(String messageType) 
	{
		this.messageType = messageType;
	}
	
	/**
	 * 返回 消息类型
	 * @return
	 */
	public String getMessageType() 
	{
		return this.messageType;
	}
	
	/**
	 * 设置 是否可以回复
	 * @param canReply 是否可以回复
	 */
	public void setCanReply(Short canReply) 
	{
		this.canReply = canReply;
	}
	
	/**
	 * 返回 是否可以回复
	 * @return
	 */
	public Short getCanReply() 
	{
		return this.canReply;
	}
	
	/**
	 * 设置 是否公告
	 * @param isPublic 是否公告
	 */
	public void setIsPublic(Short isPublic) 
	{
		this.isPublic = isPublic;
	}
	
	/**
	 * 返回 是否公告
	 * @return
	 */
	public Short getIsPublic() 
	{
		return this.isPublic;
	}
	
	/**
	 * 设置 内容
	 * @param content 内容
	 */
	public void setContent(String content) 
	{
		this.content = content;
	}
	
	/**
	 * 返回 内容
	 * @return
	 */
	public String getContent() 
	{
		return this.content;
	}
	
	/**
	 * 设置 附件信息
	 * @param fileMsg 附件信息
	 */
	public void setFileMsg(String fileMsg) 
	{
		this.fileMsg = fileMsg;
	}
	
	/**
	 * 返回 附件信息
	 * @return
	 */
	public String getFileMsg() 
	{
		return this.fileMsg;
	}
	
	/**
	 * 返回阅读时间
	 * @return 
	 */
	public LocalDateTime getReceiveTime() {
		return receiveTime;
	}
	
	/**
	 * 设置阅读时间
	 * @param receiveTime 阅读时间
	 */
	public void setReceiveTime(LocalDateTime receiveTime) {
		this.receiveTime = receiveTime;
	}
	
	/**
	 * 返回接收人名称
	 * @return
	 */
	public String getReceiverName() {
		return receiverName;
	}
	
	/**
	 * 设置接收人名称
	 * @param receiverName 接收人名称
	 */
	public void setReceiverName(String receiverName) {
		this.receiverName = receiverName;
	}
	
	/**
	 * 返回接受组织名称
	 * @return
	 */
	public String getReceiverOrgName() {
		return receiverOrgName;
	}
	
	/**
	 * 设置接受组织名称
	 * @param receiverOrgName 接受组织名称
	 */
	public void setReceiverOrgName(String receiverOrgName) {
		this.receiverOrgName = receiverOrgName;
	}
	
	/**
	 * 返回接收人id
	 * @return
	 */
	public String getReceiverId() {
		return receiverId;
	}
	
	/**
	 * 设置接收人id
	 * @param receiverId 接收人id
	 */
	public void setReceiverId(String receiverId) {
		this.receiverId = receiverId;
	}
	
	/**
	 * 返回接受组织Id
	 * @return
	 */
	public String getReceiverOrgId() {
		return receiverOrgId;
	}
	
	/**
	 * 设置接受组织Id
	 * @param receiverOrgId 接受组织Id
	 */
	public void setReceiverOrgId(String receiverOrgId) {
		this.receiverOrgId = receiverOrgId;
	}
	
	/**
	 * 返回收信id
	 * @return
	 */
	public String getRid() {
		return rid;
	}
	
	/**
	 * 设置收信id
	 * @param rid 收信id
	 */
	public void setRid(String rid) {
		this.rid = rid;
	}
	
	/**
	 * 返回详情地址
	 * @return
	 */
	public String getDetailUrl() {
		return detailUrl;
	}
	
	/**
	 * 设置详情地址
	 * @param detailUrl 详情地址
	 */
	public void setDetailUrl(String detailUrl) {
		this.detailUrl = detailUrl;
	}
	
	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() 
	{
		return new ToStringBuilder(this)
		.append("id", this.id) 
		.append("subject", this.subject) 
		.append("ownerId", this.ownerId) 
		.append("owner", this.owner) 
		.append("messageType", this.messageType)  
		.append("canReply", this.canReply) 
		.append("isPublic", this.isPublic) 
		.append("content", this.content) 
		.append("fileMsg", this.fileMsg) 
		.toString();
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getSysCode() {
		return sysCode;
	}

	public void setSysCode(String sysCode) {
		this.sysCode = sysCode;
	}

	public String getMessageSourceType() {
		return messageSourceType;
	}

	public void setMessageSourceType(String messageSourceType) {
		this.messageSourceType = messageSourceType;
	}

	public String getMessageUrl() {
		return messageUrl;
	}

	public void setMessageUrl(String messageUrl) {
		this.messageUrl = messageUrl;
	}

	public String getMessageParams() {
		return messageParams;
	}

	public void setMessageParams(String messageParams) {
		this.messageParams = messageParams;
	}

	public String getResourceId() {
		return resourceId;
	}

	public void setResourceId(String resourceId) {
		this.resourceId = resourceId;
	}

	public String getResourceName() {
		return resourceName;
	}

	public void setResourceName(String resourceName) {
		this.resourceName = resourceName;
	}

	public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	public String getAppName() {
		return appName;
	}

	public void setAppName(String appName) {
		this.appName = appName;
	}

	public String getFlowId() {
		return flowId;
	}

	public void setFlowId(String flowId) {
		this.flowId = flowId;
	}

	public String getFlowName() {
		return flowName;
	}

	public void setFlowName(String flowName) {
		this.flowName = flowName;
	}

	public String getAppMobileId() {
		return appMobileId;
	}

	public void setAppMobileId(String appMobileId) {
		this.appMobileId = appMobileId;
	}

	public String getAppMobileName() {
		return appMobileName;
	}

	public void setAppMobileName(String appMobileName) {
		this.appMobileName = appMobileName;
	}

	public Short getIsDele() {
		return isDele;
	}

	public void setIsDele(Short isDele) {
		this.isDele = isDele;
	}

	public String getOwnerSource() {
		return ownerSource;
	}

	public void setOwnerSource(String ownerSource) {
		this.ownerSource = ownerSource;
	}

	public String getOwnerSourceId() {
		return ownerSourceId;
	}

	public void setOwnerSourceId(String ownerSourceId) {
		this.ownerSourceId = ownerSourceId;
	}

	public String getOwnerSourceName() {
		return ownerSourceName;
	}

	public void setOwnerSourceName(String ownerSourceName) {
		this.ownerSourceName = ownerSourceName;
	}

	public String getOwnerSourceIcon() {
		return ownerSourceIcon;
	}

	public void setOwnerSourceIcon(String ownerSourceIcon) {
		this.ownerSourceIcon = ownerSourceIcon;
	}

	public String getOwnerSourceIconColor() {
		return ownerSourceIconColor;
	}

	public void setOwnerSourceIconColor(String ownerSourceIconColor) {
		this.ownerSourceIconColor = ownerSourceIconColor;
	}

	public String getTemplateId() {
		return templateId;
	}

	public void setTemplateId(String templateId) {
		this.templateId = templateId;
	}

	public String getTemplateData() {
		return templateData;
	}

	public void setTemplateData(String templateData) {
		this.templateData = templateData;
	}

	public String getTemplateName() {
		return templateName;
	}

	public void setTemplateName(String templateName) {
		this.templateName = templateName;
	}

	public String getMessageTag() {
		return messageTag;
	}

	public void setMessageTag(String messageTag) {
		this.messageTag = messageTag;
	}

	public String getSupportMobile() {
		return supportMobile;
	}

	public void setSupportMobile(String supportMobile) {
		this.supportMobile = supportMobile;
	}

	public String getOwnerSourceCurAppCallback() {
		return ownerSourceCurAppCallback;
	}

	public void setOwnerSourceCurAppCallback(String ownerSourceCurAppCallback) {
		this.ownerSourceCurAppCallback = ownerSourceCurAppCallback;
	}
}