updated booking class
This commit is contained in:
		
							parent
							
								
									2f7d8feec3
								
							
						
					
					
						commit
						af48d1b905
					
				
					 3 changed files with 26 additions and 2 deletions
				
			
		| 
						 | 
					@ -13,8 +13,24 @@ public class Booking {
 | 
				
			||||||
    public enum Status {
 | 
					    public enum Status {
 | 
				
			||||||
        PENDING, CONFIRMED, CANCELLED
 | 
					        PENDING, CONFIRMED, CANCELLED
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    private Status status;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    int rating; //out of 5
 | 
					    int rating; //out of 5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public Booking(int starth, int startmin, int endh, int endmin, int day, int month, int year,
 | 
				
			||||||
 | 
					                   String serviceprovider, String homeowner){
 | 
				
			||||||
 | 
					        this.starth = starth;
 | 
				
			||||||
 | 
					        this.startmin = startmin;
 | 
				
			||||||
 | 
					        this.endh = endh;
 | 
				
			||||||
 | 
					        this.endmin = endmin;
 | 
				
			||||||
 | 
					        this.day = day;
 | 
				
			||||||
 | 
					        this.month = month;
 | 
				
			||||||
 | 
					        this.year = year;
 | 
				
			||||||
 | 
					        this.serviceprovider = serviceprovider;
 | 
				
			||||||
 | 
					        this.homeowner = homeowner;
 | 
				
			||||||
 | 
					        this.status = Status.PENDING;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public int getStarth() {
 | 
					    public int getStarth() {
 | 
				
			||||||
        return starth;
 | 
					        return starth;
 | 
				
			||||||
| 
						 | 
					@ -88,6 +104,14 @@ public class Booking {
 | 
				
			||||||
        this.homeowner = homeowner;
 | 
					        this.homeowner = homeowner;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public void setStatus(Status status){
 | 
				
			||||||
 | 
					        this.status = status;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public Status getStatus(){
 | 
				
			||||||
 | 
					        return this.status;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public int getRating() {
 | 
					    public int getRating() {
 | 
				
			||||||
        return rating;
 | 
					        return rating;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,7 +11,7 @@
 | 
				
			||||||
    android:paddingRight="@dimen/activity_horizontal_margin"
 | 
					    android:paddingRight="@dimen/activity_horizontal_margin"
 | 
				
			||||||
    android:paddingTop="@dimen/activity_vertical_margin"
 | 
					    android:paddingTop="@dimen/activity_vertical_margin"
 | 
				
			||||||
    android:background="@drawable/background"
 | 
					    android:background="@drawable/background"
 | 
				
			||||||
    tools:context=".Welcome">
 | 
					    tools:context=".AdminWelcome">
 | 
				
			||||||
    <TextView
 | 
					    <TextView
 | 
				
			||||||
        android:id="@+id/Welcome"
 | 
					        android:id="@+id/Welcome"
 | 
				
			||||||
        android:layout_width="300dp"
 | 
					        android:layout_width="300dp"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,7 +11,7 @@
 | 
				
			||||||
    android:paddingRight="@dimen/activity_horizontal_margin"
 | 
					    android:paddingRight="@dimen/activity_horizontal_margin"
 | 
				
			||||||
    android:paddingTop="@dimen/activity_vertical_margin"
 | 
					    android:paddingTop="@dimen/activity_vertical_margin"
 | 
				
			||||||
    android:background="@drawable/background"
 | 
					    android:background="@drawable/background"
 | 
				
			||||||
    tools:context=".Welcome">
 | 
					    tools:context=".UsersList">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <LinearLayout
 | 
					    <LinearLayout
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue