 
 CREATE TABLE `ca_booking` (
   `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `bsource` int(1) NOT NULL DEFAULT '0',
-  `bsrcid` bigint(20) NOT NULL DEFAULT '0',
-  `bid` varchar(25) NOT NULL DEFAULT 'xxx',
+  `bksrctypeid` int(11) NOT NULL DEFAULT '0',
+  `rsvid` bigint(20) NOT NULL DEFAULT '0',
   `guestid` bigint(20) NOT NULL DEFAULT '0',
   `rmtypeid` bigint(20) NOT NULL DEFAULT '0',
-  `rmid` bigint(20) NOT NULL DEFAULT '0',
-  `overnight` bit(1) NOT NULL DEFAULT b'0',
-  `guestcount` int(11) NOT NULL DEFAULT '1',
-  `adultshare` int(11) NOT NULL DEFAULT '1',
-  `childshare` int(11) NOT NULL DEFAULT '1',
-  `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`,`bsrcid`,`bid`)
+  `roomid` bigint(20) NOT NULL DEFAULT '0',
+  `guesta` int(11) NOT NULL DEFAULT '0',
+  `guestc` int(11) NOT NULL DEFAULT '0',
+  `isovernight` bit(1) NOT NULL DEFAULT b'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`,`rsvid`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
 /*Data for the table `ca_booking` */
+
+/*Table structure for table `ca_booking_guest` */
+
+DROP TABLE IF EXISTS `ca_booking_guest`;
+
+CREATE TABLE `ca_booking_guest` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `bkid` bigint(20) NOT NULL DEFAULT '0',
+  `bcid` bigint(20) NOT NULL DEFAULT '0',
+  `gname` varchar(50) DEFAULT NULL,
+  `gclass` int(11) NOT NULL DEFAULT '1',
+  `timein` time DEFAULT NULL,
+  `expdate` datetime DEFAULT NULL,
+  `createdbyid` bigint(20) NOT NULL DEFAULT '0',
+  `datecreate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  PRIMARY KEY (`id`,`bkid`,`bcid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+/*Data for the table `ca_booking_guest` */
+
+/*Table structure for table `ca_booking_items` */
+
+DROP TABLE IF EXISTS `ca_booking_items`;
+
+CREATE TABLE `ca_booking_items` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT,
+  `bkid` bigint(20) NOT NULL DEFAULT '0',
+  `itemtype` int(11) NOT NULL DEFAULT '0',
+  `itemdesc` varchar(150) NOT NULL DEFAULT 'Item-0',
+  `itemqty` int(11) NOT NULL DEFAULT '1',
+  `itemamt` decimal(10,2) NOT NULL DEFAULT '0.00',
+  `ispaid` bit(1) NOT NULL DEFAULT b'0',
+  `createdbyid` bigint(20) NOT NULL DEFAULT '0',
+  `datecreated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+/*Data for the table `ca_booking_items` */
 
 /*Table structure for table `ca_guest_info` */
 

DROP TABLE IF EXISTS `ca_reservation`;

CREATE TABLE `ca_reservation` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `guestid` 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',
  `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`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `ca_reservation` */

  `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` */

