package ee.ut.math.tvt2008.salessystem.domain.data;

import java.util.Date;

/**
 * System client. Every client has a name and a discount percentage.
 * This object is used by hibernate and corresponds to a table in database.
 */
public class Client implements DisplayableItem {
	private Long id;
	private String firstName, lastName;
	private Integer discountPercentage;
	private Date dueDate;
	private Sale dueSale;
	
	public Integer getDiscountPercentage() {
		return discountPercentage;
	}

	public void setDiscountPercentage(Integer discountPercentage) {
		this.discountPercentage = discountPercentage;
	}

	public String getFirstName() {
		return firstName;
	}
        public String getLastName() {
            return lastName;
        }
        public String getName(){
            return firstName + " " + lastName;
        }
        public void setLastName(String lastName){
            this.lastName = lastName;
        }

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setDueDate(Date dueDate) {
		this.dueDate = dueDate;
	}

	public Date getDueDate() {
		return dueDate;
	}

	public void setDueSale(Sale dueSale) {
		this.dueSale = dueSale;
	}

	public Sale getDueSale() {
		return dueSale;
	}
}
