package com.yeshi.makemoney.app.entity.msg;
|
|
import com.yeshi.makemoney.app.entity.SystemEnum;
|
import org.springframework.data.annotation.Id;
|
import org.springframework.data.mongodb.core.index.Indexed;
|
import org.springframework.data.mongodb.core.mapping.Document;
|
import org.yeshi.utils.StringUtil;
|
|
import java.util.Date;
|
|
/**
|
* @author hxh
|
* @title: AppPageNotifyMsg
|
* @description: 应用页面的通知消息
|
* @date 2022/4/2 14:44
|
*/
|
@Document(collection = "appPageNotifyMsg")
|
public class AppPageNotifyMsg {
|
|
public enum AppPageNotifyMsgType {
|
team("团队"),task("任务");
|
|
private String name;
|
|
private AppPageNotifyMsgType(String name) {
|
this.name = name;
|
}
|
|
public String getName() {
|
return name;
|
}
|
|
}
|
|
@Id
|
private String id;
|
|
@Indexed
|
private SystemEnum system;
|
|
@Indexed
|
private AppPageNotifyMsgType type;
|
|
/**
|
* 是否显示
|
**/
|
@Indexed
|
private Boolean show;
|
|
/**
|
* 是否可以关闭
|
**/
|
private Boolean canClose;
|
|
/**
|
* 内容
|
**/
|
private String content;
|
|
/**
|
* 链接
|
**/
|
private String contentUrl;
|
|
/**
|
* type+内容+链接的md5
|
**/
|
private String md5;
|
|
/**
|
* 开始时间
|
**/
|
@Indexed
|
private Date startTime;
|
|
/**
|
* 结束时间
|
**/
|
@Indexed
|
private Date endTime;
|
private Date createTime;
|
private Date updateTime;
|
|
public String toId() {
|
return system.name() + "-" + type.name();
|
}
|
|
public String toMD5() {
|
return StringUtil.Md5(type.name() + "#" + content + "#" + contentUrl);
|
}
|
|
|
public String getId() {
|
return id;
|
}
|
|
public void setId(String id) {
|
this.id = id;
|
}
|
|
public SystemEnum getSystem() {
|
return system;
|
}
|
|
public void setSystem(SystemEnum system) {
|
this.system = system;
|
}
|
|
public AppPageNotifyMsgType getType() {
|
return type;
|
}
|
|
public void setType(AppPageNotifyMsgType type) {
|
this.type = type;
|
}
|
|
public Boolean getShow() {
|
return show;
|
}
|
|
public void setShow(Boolean show) {
|
this.show = show;
|
}
|
|
public Boolean getCanClose() {
|
return canClose;
|
}
|
|
public void setCanClose(Boolean canClose) {
|
this.canClose = canClose;
|
}
|
|
public String getContent() {
|
return content;
|
}
|
|
public void setContent(String content) {
|
this.content = content;
|
}
|
|
public String getContentUrl() {
|
return contentUrl;
|
}
|
|
public void setContentUrl(String contentUrl) {
|
this.contentUrl = contentUrl;
|
}
|
|
public String getMd5() {
|
return md5;
|
}
|
|
public void setMd5(String md5) {
|
this.md5 = md5;
|
}
|
|
public Date getStartTime() {
|
return startTime;
|
}
|
|
public void setStartTime(Date startTime) {
|
this.startTime = startTime;
|
}
|
|
public Date getEndTime() {
|
return endTime;
|
}
|
|
public void setEndTime(Date endTime) {
|
this.endTime = endTime;
|
}
|
|
public Date getCreateTime() {
|
return createTime;
|
}
|
|
public void setCreateTime(Date createTime) {
|
this.createTime = createTime;
|
}
|
|
public Date getUpdateTime() {
|
return updateTime;
|
}
|
|
public void setUpdateTime(Date updateTime) {
|
this.updateTime = updateTime;
|
}
|
}
|