EventDataEntity.java
4.87 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
package com.viontech.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.viontech.common.VionTechJsonbType;
import com.viontech.entity.archive.EventArchiveRelEntity;
import lombok.ToString;
import org.hibernate.annotations.Type;
import org.hibernate.annotations.TypeDef;
import javax.persistence.*;
import java.util.Date;
/**
* Created by Administrator
*/
@Entity
@Table(name = "tb_event_data")
@Inheritance(strategy = InheritanceType.JOINED)
@TypeDef(name = "json", typeClass = VionTechJsonbType.class)
@ToString
public class EventDataEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
Integer event_unid;
//@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
@Column(name = "event_dt", nullable = true)
Date eventDt;
@Column(name = "task_type", nullable = true)
private String taskType;
@Column(name = "task_id", nullable = true)
private String taskId;
@Column(name = "event_type", nullable = true)
private String eventType;
@Column(name = "event_refid", nullable = true)
private String eventRefid;
@Column(name = "pics", nullable = true, columnDefinition = "jsonb")
@Type(type = "json")
private Object pics;
@Column(name = "event_cate", nullable = true)
private String eventCate;
@Column(name = "video", nullable = true, columnDefinition = "jsonb")
@Type(type = "json")
private Object video;
@Column(name = "subtask_id", nullable = true)
private String subtaskId;
@Column(name = "source_type", nullable = true)
private String sourceType;
@Column(name = "location_name", nullable = true)
private String locationName;
@Column(name = "location_code", nullable = true)
private String locationCode;
@Column(name = "original_json", nullable = true, columnDefinition = "jsonb")
@Type(type = "json")
private Object originalJson;
@OneToOne(mappedBy = "eventDataEntity",cascade={CascadeType.ALL,CascadeType.REMOVE})
private EventArchiveRelEntity eventArchiveRelEntity;
@Column(name="is_archive")
private Boolean isArchive=false;
public Integer getEvent_unid() {
return event_unid;
}
public void setEvent_unid(Integer event_unid) {
this.event_unid = event_unid;
}
public Date getEventDt() {
return eventDt;
}
public void setEventDt(Date eventDt) {
this.eventDt = eventDt;
}
public String getTaskType() {
return taskType;
}
public void setTaskType(String taskType) {
this.taskType = taskType;
}
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public String getEventType() {
return eventType;
}
public void setEventType(String eventType) {
this.eventType = eventType;
}
public String getEventRefid() {
return eventRefid;
}
public void setEventRefid(String eventRefid) {
this.eventRefid = eventRefid;
}
public String getEventCate() {
return eventCate;
}
public void setEventCate(String eventCate) {
this.eventCate = eventCate;
}
public String getSubtaskId() {
return subtaskId;
}
public void setSubtaskId(String subtaskId) {
this.subtaskId = subtaskId;
}
public String getSourceType() {
return sourceType;
}
public void setSourceType(String sourceType) {
this.sourceType = sourceType;
}
public String getLocationName() {
return locationName;
}
public void setLocationName(String locationName) {
this.locationName = locationName;
}
public String getLocationCode() {
return locationCode;
}
public void setLocationCode(String locationCode) {
this.locationCode = locationCode;
}
public Object getOriginalJson() {
return originalJson;
}
public void setOriginalJson(Object originalJson) {
this.originalJson = originalJson;
}
public EventArchiveRelEntity getEventArchiveRelEntity() {
return eventArchiveRelEntity;
}
public void setEventArchiveRelEntity(EventArchiveRelEntity eventArchiveRelEntity) {
this.eventArchiveRelEntity = eventArchiveRelEntity;
}
public Object getPics() {
return pics;
}
public void setPics(Object pics) {
this.pics = pics;
}
public Object getVideo() {
return video;
}
public void setVideo(Object video) {
this.video = video;
}
public Boolean getArchive() {
return isArchive;
}
public void setArchive(Boolean archive) {
isArchive = archive;
}
}