<?php
/*******************************************************************************
 *                    _ _ _ _
 *                   / _ _  /
 *            _ _   / /__/ /_ _   ____ _ _   _ _ _    __
 *           / _ ` /   _ _// _ ` / __// _ ` / _ \\ \ / /
 *          / _ _// /\ \  / _ _/ \_ \/ _ _// / \/ \ ` /
 *          \_ , /_/  \_\ \_ ,  /__ /\_ , /_/      \_/
 *
 *******************************************************************************
 *    Application:  eReserv
 *    Version:      6
 *    Author:       David Di Certo
 *    Website:      http://www.cogites.com
 *    Email:        contact@cogites.com
 *    Copyright:    2013 - David Di Certo
 *******************************************************************************
 *    == FR ==      La revente et la redistribution de l'application sont
 *                  strictement interdites.
 *
 *                  Vous êtes tenu d'avoir pris connaissance des
 *                  Conditions Générales de Vente disponibles sur Cogites.com
 *                  (y compris pour la version Free).
 *
 *    == EN ==      Resale and redistribution of the application are
 *                  Strictly prohibited.
 *
 *                  You are required to have read the Terms and Conditions
 *                  available on Cogites.com (including the Free version).
 *
 *******************************************************************************
*/

class ReservationVo {

	public $reservation_id;
	public $recorddate;
	public $tenancy_id;
	public $tenancy_name;
	public $tenancy_imagepath;
	public $tenant_id;
	public $tenant_name;
	public $tenant_lastname;
	public $tenant_email;
	public $arrival_date;
	public $departure_date;
	public $lease_date;
	public $price;
	public $vat;
	public $deposit;
	public $paid;
	public $adults_nb;
	public $childs_nb;
	public $baby_nb;
	public $disabled;
	public $status;
	public $comment;
	public $reference;

    public function __construct(array $data = array())
    {
        foreach($data as $key => $value) {
			if ($key=='reservation_id') $this->reservation_id = $value;
			if ($key=='recorddate') $this->recorddate = $value;
			if ($key=='tenancy_id') $this->tenancy_id = $value;
			if ($key=='tenancy_name') $this->tenancy_name = $value;
			if ($key=='tenancy_imagepath') $this->tenancy_imagepath = empty($value) ? "/styles/img/tenancy/no_image.jpg" : $value;
			if ($key=='tenant_id') $this->tenant_id = $value;
			if ($key=='tenant_name') $this->tenant_name = $value;
			if ($key=='tenant_lastname') $this->tenant_lastname = $value;
			if ($key=='tenant_email') $this->tenant_email = $value;
			if ($key=='arrival_date') $this->arrival_date = $value;
			if ($key=='departure_date') $this->departure_date = $value;
			if ($key=='lease_date') $this->lease_date = $value;
			if ($key=='price') $this->price = $value;
			if ($key=='vat') $this->vat = $value;
			if ($key=='deposit') $this->deposit = $value;
			if ($key=='paid') $this->paid = $value;
			if ($key=='adults_nb') $this->adults_nb = $value;
			if ($key=='childs_nb') $this->childs_nb = $value;
			if ($key=='baby_nb') $this->baby_nb = $value;
			if ($key=='disabled') $this->disabled = $value;
			if ($key=='status') $this->status = $value;
			if ($key=='comment') $this->comment = $value;
			if ($key=='reference') $this->reference = $value;
	      }
    }

}
?>