Skip to content

Commit

Permalink
edit model order
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenht65 committed Mar 7, 2022
1 parent 9061140 commit 53b454c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
14 changes: 13 additions & 1 deletion app/src/main/java/fu/prm391/sampl/project/model/order/Order.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public class Order {
@SerializedName("address")
@Expose
private Address address;
@SerializedName("status")
@Expose
private int status;
@SerializedName("quantity")
@Expose
private int quantity;
Expand All @@ -27,9 +30,10 @@ public class Order {
public Order() {
}

public Order(Product product, Address address, int quantity, String createdAt, String updatedAt) {
public Order(Product product, Address address, int status, int quantity, String createdAt, String updatedAt) {
this.product = product;
this.address = address;
this.status = status;
this.quantity = quantity;
this.createdAt = createdAt;
this.updatedAt = updatedAt;
Expand All @@ -51,6 +55,14 @@ public void setAddress(Address address) {
this.address = address;
}

public int getStatus() {
return status;
}

public void setStatus(int status) {
this.status = status;
}

public int getQuantity() {
return quantity;
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/item_my_orders_history_product.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<androidx.cardview.widget.CardView
android:id="@+id/cardView9"
android:layout_width="110dp"
android:layout_width="95dp"
android:layout_height="100dp"
android:layout_marginStart="20dp"
android:layout_marginTop="30dp"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.1'
classpath 'com.android.tools.build:gradle:7.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down

0 comments on commit 53b454c

Please sign in to comment.