Skip to content

Instantly share code, notes, and snippets.

@bruferrari
Created October 31, 2018 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bruferrari/bf0ef7aad537a06823b9a6770605e714 to your computer and use it in GitHub Desktop.
Save bruferrari/bf0ef7aad537a06823b9a6770605e714 to your computer and use it in GitHub Desktop.
@Entity(tableName = RecipesDbContract.RECIPES_TABLE_NAME)
@Parcel(Parcel.Serialization.BEAN)
public class Recipe {
@PrimaryKey
@SerializedName("id")
@Expose
private Integer id;
@SerializedName("name")
@Expose
private String name;
@SerializedName("image")
@Expose
private String image;
@SerializedName("servings")
@Expose
private Integer servings;
@SerializedName("ingredients")
@Expose
@Ignore
private List<Ingredient> ingredients = null;
@SerializedName("steps")
@Expose
@Ignore
private List<Step> steps = null;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
public Integer getServings(){
return servings;
}
public void setServings(Integer servings){
this.servings = servings;
}
public List<Ingredient> getIngredients() {
return ingredients;
}
public void setIngredients(List<Ingredient> ingredients) {
this.ingredients = ingredients;
}
public List<Step> getSteps(){
return steps;
}
public void setSteps(List<Step> steps){
this.steps = steps;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment