PushLog.java
2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package com.brframework.commonapppush.entity;
import com.alibaba.fastjson.annotation.JSONField;
import com.brframework.commoncms.annatotion.column.SelectColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.persistence.*;
import java.time.LocalDateTime;
/**
* 推送记录
* @author xu
* @date 2019/11/18 19:09
*/
@Data
@Entity
@Table(name = "pus_log")
@ApiModel
public class PushLog {
/** 单播 */
public static final String MESSAGE_TYPE_UNICAST = "unicast";
/** 列播 要求不超过500个device_token */
public static final String MESSAGE_TYPE_LISTCAST = "listcast";
/** 文件播 多个device_token可通过文件形式批量发送 */
public static final String MESSAGE_TYPE_FILECAST = "filecast";
/** 广播 */
public static final String MESSAGE_TYPE_BROADCAST = "broadcast";
/** 组播,按照filter筛选用户群, 请参照filter参数 */
public static final String MESSAGE_TYPE_GROUPCAST = "groupcast";
/** 已发送 */
public static final Integer STATUS_OK = 1;
/** 发送错误 */
public static final Integer STATUS_ERROR = 2;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "id", required = true, example = "1")
Long id;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建时间", required = true, example = "2019-04-24 16:23:19")
@Column(updatable = false)
LocalDateTime createDate;
@ApiModelProperty(value = "消息类型")
@SelectColumn(options = {"unicast,单播", "listcast,列播", "filecast,文件播", "broadcast,广播", "groupcast,组播"})
String messageType;
@ApiModelProperty(value = "消息id")
String messageId;
@ApiModelProperty(value = "状态")
@SelectColumn(options = {"1,已发送", "2,失败"})
Integer status;
@ApiModelProperty(value = "错误信息")
String errorInfo;
@ApiModelProperty(value = "系统")
String os;
@ApiModelProperty(value = "客户端标识")
String deviceTokens;
@ApiModelProperty(value = "系统用户标识")
String userTokens;
@ApiModelProperty(value = "消息标题")
String title;
@ApiModelProperty(value = "消息内容")
String text;
@ApiModelProperty(value = "跳转(android有效)")
String uri;
@ApiModelProperty(value = "消息描述")
String description;
}