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