@Entity(tableName = "transaction_accounts", foreignKeys = {
@ForeignKey(entity = Transaction.class, parentColumns = {"id"},
childColumns = {"transaction_id"}, onDelete = ForeignKey.CASCADE,
- onUpdate = ForeignKey.RESTRICT),
-}, indices = {@Index(name = "fk_tran_acc_trans", value = {"transaction_id"}),
+ onUpdate = ForeignKey.RESTRICT)
+}, indices = {@Index(name = "fk_trans_acc_trans", value = {"transaction_id"}),
@Index(name = "un_transaction_accounts", unique = true,
value = {"transaction_id", "order_no"})
})
@PrimaryKey(autoGenerate = true)
private long id;
@ColumnInfo(name = "transaction_id")
- private int transactionId;
+ private long transactionId;
@ColumnInfo(name = "order_no")
private int orderNo;
@ColumnInfo(name = "account_name")
@ColumnInfo
private String comment;
@ColumnInfo(defaultValue = "0")
- private int generation = 0;
+ private long generation = 0;
public long getId() {
return id;
}
this.id = id;
}
@NonNull
- public int getTransactionId() {
+ public long getTransactionId() {
return transactionId;
}
- public void setTransactionId(int transactionId) {
+ public void setTransactionId(long transactionId) {
this.transactionId = transactionId;
}
public int getOrderNo() {
public void setComment(String comment) {
this.comment = comment;
}
- public int getGeneration() {
+ public long getGeneration() {
return generation;
}
- public void setGeneration(int generation) {
+ public void setGeneration(long generation) {
this.generation = generation;
}
}