-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathbooking.sql
More file actions
65 lines (57 loc) · 1.3 KB
/
booking.sql
File metadata and controls
65 lines (57 loc) · 1.3 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
-- Important:
-- Important: Only use on personal server do not run on wwwlab
-- Important:
-- create database BookingSystem;
-- use BookingSystem;
-- Important:
-- Important: Only use on personal server do not run on wwwlab
-- Important:
use BookingSystem;
create table customer(
ID varchar(32),
lastvisit datetime,
firstname varchar(64),
lastname varchar(64),
address varchar(64),
email varchar(64),
auxdata varchar(2048),
primary key(ID)
);
create table click(
ID integer not null auto_increment,
time datetime,
type varchar(32),
customerID varchar(32),
clickdata varchar(32),
primary key(ID)
);
create table resource(
ID varchar(32),
name varchar(64),
type varchar(32),
company varchar(64),
location varchar(64),
category varchar(64),
size integer,
cost integer,
auxdata varchar(2048),
primary key(ID)
);
create table resourceavailability(
resourceID varchar(32),
date datetime,
dateto datetime,
primary key (resourceID,date)
);
create table booking(
resourceID varchar(32),
date datetime,
dateto datetime,
position integer,
cost integer,
status integer,
rebate integer,
customerID varchar(32),
auxdata varchar(2048),
primary key(resourceID,date,position)
);