 DROP TABLE IF EXISTS `ca_reservation`;
 
 CREATE TABLE `ca_reservation` (
-  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `id` bigint(20) NOT NULL DEFAULT '0',
+  `rsid` varchar(20) NOT NULL DEFAULT 'RESV-000000-00000000',
   `guestid` bigint(20) NOT NULL DEFAULT '0',
+  `rmtypeid` bigint(20) NOT NULL DEFAULT '0',
   `roomid` bigint(20) NOT NULL DEFAULT '0',
-  `resdate` date NOT NULL,
-  `restimefrom` time DEFAULT NULL,
-  `restimeto` time DEFAULT NULL,
-  `estguest` int(11) NOT NULL DEFAULT '1',
-  `dppaid` bit(1) NOT NULL DEFAULT b'0',
+  `rsdatetime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `isovernight` bit(1) NOT NULL DEFAULT b'0',
+  `estguestcnt` int(11) NOT NULL DEFAULT '1',
+  `isdppaid` bit(1) NOT NULL DEFAULT b'0',
+  `dptypeid` bit(1) NOT NULL DEFAULT b'0',
   `dpamount` decimal(10,2) NOT NULL DEFAULT '0.00',
-  `datecreated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
-  `createdbyid` bigint(20) NOT NULL DEFAULT '0',
-  `datemodified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
-  `modifiedbyid` bigint(20) NOT NULL DEFAULT '0',
-  PRIMARY KEY (`id`)
+  `rsvstatus` int(11) NOT NULL DEFAULT '0',
+  `createdbyid` bigint(20) NOT NULL DEFAULT '0',
+  `datecreated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  `modifiedbyid` bigint(20) NOT NULL DEFAULT '0',
+  `datemodified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`,`rsid`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
 /*Data for the table `ca_reservation` */

  `datemodified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `modifiedbyid` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`,`rmtypeid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

/*Data for the table `ca_room_rates` */

insert  into `ca_room_rates`(`id`,`rmtypeid`,`regular`,`regtimein`,`regtimeout`,`overnight`,`ovntimein`,`ovntimeout`,`extension`,`extratebase`,`datecreated`,`createdbyid`,`datemodified`,`modifiedbyid`) values (1,1,'1000.00','07:00:00','17:00:00','1000.00','19:00:00','05:00:00','1000.00',1,'2017-02-09 00:06:32',0,'2017-02-09 00:06:32',0),(2,2,'1500.00','07:00:00','17:00:00','1500.00','19:00:00','05:00:00','1500.00',1,'2017-02-09 00:06:32',0,'2017-02-09 00:06:32',0),(3,3,'2000.00','07:00:00','17:00:00','2000.00','19:00:00','05:00:00','2000.00',1,'2017-02-09 00:06:32',0,'2017-02-09 00:06:32',0),(4,4,'2500.00','07:00:00','17:00:00','2500.00','19:00:00','05:00:00','2500.00',1,'2017-02-09 00:06:32',0,'2017-02-09 00:06:32',0);

/*Table structure for table `ca_rooms` */


  `typedesc` varchar(50) DEFAULT NULL,
  `dptype` bit(1) NOT NULL DEFAULT b'0',
  `dpvalue` double NOT NULL DEFAULT '0',
  `recstatus` bit(1) NOT NULL DEFAULT b'1',
  `datecreated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `createdbyid` bigint(20) NOT NULL DEFAULT '0',
  `datemodified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `modifiedbyid` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;

/*Data for the table `ca_roomtype` */

insert  into `ca_roomtype`(`id`,`typedesc`,`dptype`,`dpvalue`,`recstatus`,`datecreated`,`createdbyid`,`datemodified`,`modifiedbyid`) values (1,'Umbrella (1-13)','',50,'','2017-02-12 02:24:49',0,'2017-02-12 02:24:49',0),(2,'Gazebo (1-2)','',50,'','2017-02-12 02:24:49',0,'2017-02-12 02:24:49',0),(3,'Gazebo (3-5)','',50,'','2017-02-12 02:24:49',0,'2017-02-12 02:24:49',0),(4,'Cabana (1-30)','',50,'','2017-02-12 02:24:49',0,'2017-02-12 02:24:49',0),(5,'Cabana (31-32)','',50,'','2017-02-12 02:24:49',0,'2017-02-12 02:24:49',0),(6,'Standard Rooms','',50,'','2017-02-12 02:24:49',0,'2017-02-12 02:24:49',0),(7,'Family Rooms','',50,'','2017-02-12 02:24:49',0,'2017-02-12 02:24:49',0),(8,'Villa 5 (Open)','',50,'','2017-02-12 02:24:49',0,'2017-02-12 02:24:49',0),(9,'Villa (1-6)','',50,'','2017-02-12 02:24:49',0,'2017-02-12 02:24:49',0),(10,'Function Rooms','',50,'','2017-02-12 02:24:49',0,'2017-02-12 02:24:49',0),(11,'Pavillion','',50,'','2017-02-12 12:39:53',0,'2017-02-12 12:39:53',0);

/*Table structure for table `ca_user_roles` */

