|
|
@ -19,14 +19,14 @@ import io.requery.Table;
|
|
|
|
import io.requery.sql.EntityDataStore;
|
|
|
|
import io.requery.sql.EntityDataStore;
|
|
|
|
|
|
|
|
|
|
|
|
public class JournalModel {
|
|
|
|
public class JournalModel {
|
|
|
|
// FIXME: Add unique constraint on the uid + service combination. Can't do it at the moment because requery is broken.
|
|
|
|
|
|
|
|
@Entity
|
|
|
|
@Entity
|
|
|
|
@Table(name = "Journal")
|
|
|
|
@Table(name = "Journal", uniqueIndexes = "journal_unique_together")
|
|
|
|
public static abstract class Journal {
|
|
|
|
public static abstract class Journal {
|
|
|
|
@Key
|
|
|
|
@Key
|
|
|
|
@Generated
|
|
|
|
@Generated
|
|
|
|
int id;
|
|
|
|
int id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Index(value = "journal_unique_together")
|
|
|
|
@Column(length = 64, nullable = false)
|
|
|
|
@Column(length = 64, nullable = false)
|
|
|
|
String uid;
|
|
|
|
String uid;
|
|
|
|
|
|
|
|
|
|
|
@ -41,6 +41,7 @@ public class JournalModel {
|
|
|
|
@Deprecated
|
|
|
|
@Deprecated
|
|
|
|
long service;
|
|
|
|
long service;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Index(value = "journal_unique_together")
|
|
|
|
@ForeignKey(update = ReferentialAction.CASCADE)
|
|
|
|
@ForeignKey(update = ReferentialAction.CASCADE)
|
|
|
|
@ManyToOne
|
|
|
|
@ManyToOne
|
|
|
|
Service serviceModel;
|
|
|
|
Service serviceModel;
|
|
|
|