crystal-wallet-android/app/src/main/java/cy/agorise/crystalwallet/models/CryptoNetAccount.java

80 lines
1.7 KiB
Java
Raw Normal View History

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")
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")
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;
public long getId() {
2017-09-08 00:31:38 +00:00
return mId;
}
public void setId(long id){
2017-09-08 00:31:38 +00:00
this.mId = id;
}
public long getSeedId() {
2017-09-08 00:31:38 +00:00
return mSeedId;
}
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;
}
}