83 lines
1.8 KiB
Java
83 lines
1.8 KiB
Java
package org.mian.gitnex.database.models;
|
|
|
|
import androidx.annotation.Nullable;
|
|
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 = "Drafts", foreignKeys = @ForeignKey(entity = Repositories.class,
|
|
parentColumns = "repositoryId",
|
|
childColumns = "draftRepositoryId",
|
|
onDelete = CASCADE),
|
|
indices = {@Index("draftRepositoryId")})
|
|
public class Drafts implements Serializable {
|
|
|
|
@PrimaryKey(autoGenerate = true)
|
|
private int draftId;
|
|
|
|
private int draftRepositoryId;
|
|
private int draftAccountId;
|
|
private int issueId;
|
|
private String draftText;
|
|
@Nullable
|
|
private String draftType;
|
|
|
|
public int getDraftId() {
|
|
return draftId;
|
|
}
|
|
|
|
public void setDraftId(int draftId) {
|
|
this.draftId = draftId;
|
|
}
|
|
|
|
public int getDraftRepositoryId() {
|
|
return draftRepositoryId;
|
|
}
|
|
|
|
public void setDraftRepositoryId(int draftRepositoryId) {
|
|
this.draftRepositoryId = draftRepositoryId;
|
|
}
|
|
|
|
public int getDraftAccountId() {
|
|
return draftAccountId;
|
|
}
|
|
|
|
public void setDraftAccountId(int draftAccountId) {
|
|
this.draftAccountId = draftAccountId;
|
|
}
|
|
|
|
public int getIssueId() {
|
|
return issueId;
|
|
}
|
|
|
|
public void setIssueId(int issueId) {
|
|
this.issueId = issueId;
|
|
}
|
|
|
|
public String getDraftText() {
|
|
return draftText;
|
|
}
|
|
|
|
public void setDraftText(String draftText) {
|
|
this.draftText = draftText;
|
|
}
|
|
|
|
@Nullable
|
|
public String getDraftType() {
|
|
|
|
return draftType;
|
|
}
|
|
|
|
public void setDraftType(@Nullable String draftType) {
|
|
|
|
this.draftType = draftType;
|
|
}
|
|
|
|
} |