This repository has been archived on 2020-06-04. You can view files and clone it, but cannot push or open issues or pull requests.
GitNex/app/src/main/java/org/mian/gitnex/database/models/Repositories.java
M M Arif aa33b492d0
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
some refactor. added models, dao, entities (accounts, repositories, drafts)
2019-10-14 20:15:12 +05:00

59 lines
1.4 KiB
Java

package org.mian.gitnex.database.models;
import androidx.room.Entity;
import androidx.room.ForeignKey;
import androidx.room.Index;
import androidx.room.PrimaryKey;
import java.io.Serializable;
import static androidx.room.ForeignKey.CASCADE;
/**
* Author M M Arif
*/
@Entity(tableName = "repositories", foreignKeys = @ForeignKey(entity = UserAccounts.class,
parentColumns = "accountId",
childColumns = "repoAccountId",
onDelete = CASCADE),
indices = {@Index("repoAccountId")})
public class Repositories implements Serializable {
@PrimaryKey(autoGenerate = true)
private int repositoryId;
private int repoAccountId;
private String repositoryOwner;
private String repositoryName;
public int getRepositoryId() {
return repositoryId;
}
public void setRepositoryId(int repositoryId) {
this.repositoryId = repositoryId;
}
public int getRepoAccountId() {
return repoAccountId;
}
public void setRepoAccountId(int repoAccountId) {
this.repoAccountId = repoAccountId;
}
public String getRepositoryOwner() {
return repositoryOwner;
}
public void setRepositoryOwner(String repositoryOwner) {
this.repositoryOwner = repositoryOwner;
}
public String getRepositoryName() {
return repositoryName;
}
public void setRepositoryName(String repositoryName) {
this.repositoryName = repositoryName;
}
}