-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestdb.php
44 lines (36 loc) · 1.02 KB
/
testdb.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
require 'app/Util.php';
require 'app/DB.php';
require 'app/dao/BookingReservationDAO.php';
require 'app/dao/CustomerDAO.php';
require 'app/dao/BookingDetailDAO.php';
require 'app/models/Customer.php';
require 'app/models/Booking.php';
require 'app/models/Reservation.php';
require 'app/models/Pricing.php';
require 'app/handlers/BookingReservationHandler.php';
try {
$r = new Reservation();
$r->setCid(1);
$r->setStatus("pending");
$r->setNotes("asd");
$r->setStart("123");
$r->setEnd("123");
$r->setType("asd");
$r->setRequirement("asd");
$r->setAdults("asdasd");
$r->setChildren("asda");
$r->setRequests("adsdas");
$r->setTimestamp("sdas");
$r->setHash(uniqid());
// and all reservation information
$p = new Pricing();
$p->setBookedDate(Util::dateToday('0'));
$p->setNights(3);
$p->setPricingId(1);
$p->setTotalPrice(2000);
$brh = new BookingReservationHandler($r, $p);
echo $brh->create();
} catch (Exception $e) {
print $e->getMessage();
}