2017-09-08 00:31:38 +00:00
|
|
|
package cy.agorise.crystalwallet.models;
|
|
|
|
|
2017-09-13 21:52:36 +00:00
|
|
|
|
|
|
|
import android.arch.persistence.room.ColumnInfo;
|
|
|
|
import android.arch.persistence.room.Entity;
|
|
|
|
import android.arch.persistence.room.ForeignKey;
|
|
|
|
import android.arch.persistence.room.Index;
|
|
|
|
import android.arch.persistence.room.PrimaryKey;
|
2017-09-08 00:31:38 +00:00
|
|
|
|
|
|
|
/**
|
2017-09-13 21:52:36 +00:00
|
|
|
* Represents a geneeric CryptoNet Account
|
|
|
|
*
|
2017-09-08 00:31:38 +00:00
|
|
|
* Created by Henry Varona on 6/9/2017.
|
|
|
|
*/
|
|
|
|
|
2017-09-13 21:52:36 +00:00
|
|
|
@Entity(tableName = "crypto_net_account",
|
2017-09-10 23:13:32 +00:00
|
|
|
indices = {@Index("id"),@Index("seed_id")},
|
|
|
|
foreignKeys = @ForeignKey(entity = AccountSeed.class,
|
2017-09-08 00:31:38 +00:00
|
|
|
parentColumns = "id",
|
|
|
|
childColumns = "seed_id"))
|
|
|
|
public class CryptoNetAccount {
|
|
|
|
|
2017-09-13 21:52:36 +00:00
|
|
|
/**
|
|
|
|
* The id on the database
|
|
|
|
*/
|
2017-09-08 00:31:38 +00:00
|
|
|
@PrimaryKey(autoGenerate = true)
|
|
|
|
@ColumnInfo(name = "id")
|
2017-09-27 02:24:23 +00:00
|
|
|
private long mId;
|
2017-09-08 00:31:38 +00:00
|
|
|
|
2017-09-13 21:52:36 +00:00
|
|
|
/**
|
|
|
|
* The id of the seed used by this account
|
|
|
|
*/
|
2017-09-08 00:31:38 +00:00
|
|
|
@ColumnInfo(name = "seed_id")
|
2017-09-27 02:24:23 +00:00
|
|
|
private long mSeedId;
|
2017-09-08 00:31:38 +00:00
|
|
|
|
2017-09-13 21:52:36 +00:00
|
|
|
/**
|
|
|
|
* The account number on the bip44 or slip44
|
|
|
|
*/
|
2017-09-08 00:31:38 +00:00
|
|
|
@ColumnInfo(name = "account_number")
|
|
|
|
private int mAccountNumber;
|
|
|
|
|
2017-09-13 21:52:36 +00:00
|
|
|
/**
|
2017-09-25 02:59:46 +00:00
|
|
|
* The account index on this wallet
|
2017-09-13 21:52:36 +00:00
|
|
|
*/
|
2017-09-08 00:31:38 +00:00
|
|
|
@ColumnInfo(name = "account_index")
|
|
|
|
private int mAccountIndex;
|
|
|
|
|
2017-09-27 02:24:23 +00:00
|
|
|
public long getId() {
|
2017-09-08 00:31:38 +00:00
|
|
|
return mId;
|
|
|
|
}
|
|
|
|
|
2017-09-27 02:24:23 +00:00
|
|
|
public void setId(long id){
|
2017-09-08 00:31:38 +00:00
|
|
|
this.mId = id;
|
|
|
|
}
|
|
|
|
|
2017-09-27 02:24:23 +00:00
|
|
|
public long getSeedId() {
|
2017-09-08 00:31:38 +00:00
|
|
|
return mSeedId;
|
|
|
|
}
|
|
|
|
|
2017-09-27 02:24:23 +00:00
|
|
|
public void setSeedId(long mSeedId) {
|
2017-09-08 00:31:38 +00:00
|
|
|
this.mSeedId = mSeedId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getAccountNumber() {
|
|
|
|
return mAccountNumber;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setAccountNumber(int mAccountNumber) {
|
|
|
|
this.mAccountNumber = mAccountNumber;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getAccountIndex() {
|
|
|
|
return mAccountIndex;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setAccountIndex(int mAccountIndex) {
|
|
|
|
this.mAccountIndex = mAccountIndex;
|
|
|
|
}
|
|
|
|
}
|