Created
February 7, 2021 22:17
-
-
Save bumie-e/06f46691c2021b6876fbe5e9a3a4edb7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.bumie.dounix; | |
import com.google.gson.annotations.Expose; | |
import com.google.gson.annotations.SerializedName; | |
public class Model { | |
@SerializedName("id") | |
@Expose | |
String id; | |
@SerializedName("name") | |
@Expose | |
String name; | |
@SerializedName("image") | |
@Expose | |
String image; | |
@SerializedName("description") | |
@Expose | |
String description; | |
@SerializedName("price") | |
@Expose | |
String price; | |
@SerializedName("category") | |
@Expose | |
String category; | |
public Model(String image) { | |
this.image = image; | |
} | |
public void setId(String id) { | |
this.id = id; | |
} | |
public void setName(String name) { | |
this.name = name; | |
} | |
public Model(String image, String id) { | |
this.image = image; | |
this.id = id; | |
} | |
public String getName() { | |
return name; | |
} | |
public String getImage() { | |
return image; | |
} | |
public String getDescription() { | |
return description; | |
} | |
public String getPrice() { | |
return price; | |
} | |
public String getCategory() { | |
return category; | |
} | |
@Override | |
public String toString() { | |
return "Post{" + | |
"name='" + name + '\'' + | |
", image='" + image + '\'' + | |
", description=" + description + '\''+ | |
", price=" + price + '\''+ | |
", category=" + category + | |
'}'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment