Skip to content

Commit 93f04d2

Browse files
committed
feat: assessment event
#2191
1 parent 19dd981 commit 93f04d2

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

pom-dependency-tree.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ai.elimu:webapp:war:2.6.15-SNAPSHOT
1+
ai.elimu:webapp:war:2.6.16-SNAPSHOT
22
+- ai.elimu:model:jar:model-2.0.97:compile
33
| \- com.google.code.gson:gson:jar:2.13.0:compile
44
| \- com.google.errorprone:error_prone_annotations:jar:2.37.0:compile
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
package ai.elimu.entity.analytics;
2+
3+
import ai.elimu.entity.BaseEntity;
4+
import ai.elimu.entity.application.Application;
5+
import jakarta.persistence.Column;
6+
import jakarta.persistence.ManyToOne;
7+
import jakarta.persistence.MappedSuperclass;
8+
import jakarta.persistence.Temporal;
9+
import jakarta.persistence.TemporalType;
10+
import jakarta.validation.constraints.NotNull;
11+
import java.util.Calendar;
12+
import lombok.Getter;
13+
import lombok.Setter;
14+
15+
@Getter
16+
@Setter
17+
@MappedSuperclass
18+
public abstract class AssessmentEvent extends BaseEntity {
19+
20+
@NotNull
21+
@Temporal(TemporalType.TIMESTAMP)
22+
private Calendar timestamp;
23+
24+
/**
25+
* See https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID
26+
*/
27+
@NotNull
28+
private String androidId;
29+
30+
/**
31+
* The package name of the {@link #application} where the assessment event occurred.
32+
*/
33+
@NotNull
34+
private String packageName;
35+
36+
/**
37+
* This field will only be populated if a corresponding {@link Application} can be found in the database for the {@link #packageName}.
38+
*/
39+
@ManyToOne
40+
private Application application;
41+
42+
/**
43+
* Any additional data should be stored in the format of a JSON object.
44+
*
45+
* Example:
46+
* <pre>
47+
* {'word_ids_presented': [1,2,3], 'word_id_selected': 2}
48+
* </pre>
49+
*/
50+
@Column(length = 1024)
51+
private String additionalData;
52+
}

0 commit comments

Comments
 (0)