create table Calendar (
	uuid_ VARCHAR2(75 CHAR) null,
	calendarId number(30,0) not null primary key,
	groupId number(30,0),
	companyId number(30,0),
	userId number(30,0),
	userName VARCHAR2(75 CHAR) null,
	createDate timestamp null,
	modifiedDate timestamp null,
	resourceBlockId number(30,0),
	calendarResourceId number(30,0),
	name varchar2(4000) null,
	description varchar2(4000) null,
	timeZoneId VARCHAR2(75 CHAR) null,
	color number(30,0),
	defaultCalendar number(1, 0),
	enableComments number(1, 0),
	enableRatings number(1, 0)
);

create table CalendarBooking (
	uuid_ VARCHAR2(75 CHAR) null,
	calendarBookingId number(30,0) not null primary key,
	groupId number(30,0),
	companyId number(30,0),
	userId number(30,0),
	userName VARCHAR2(75 CHAR) null,
	createDate timestamp null,
	modifiedDate timestamp null,
	resourceBlockId number(30,0),
	calendarId number(30,0),
	calendarResourceId number(30,0),
	parentCalendarBookingId number(30,0),
	vEventUid VARCHAR2(255 CHAR) null,
	title varchar2(4000) null,
	description clob null,
	location varchar2(4000) null,
	startTime number(30,0),
	endTime number(30,0),
	allDay number(1, 0),
	recurrence varchar2(4000) null,
	firstReminder number(30,0),
	firstReminderType VARCHAR2(75 CHAR) null,
	secondReminder number(30,0),
	secondReminderType VARCHAR2(75 CHAR) null,
	status number(30,0),
	statusByUserId number(30,0),
	statusByUserName VARCHAR2(75 CHAR) null,
	statusDate timestamp null
);

create table CalendarNotificationTemplate (
	uuid_ VARCHAR2(75 CHAR) null,
	calendarNotificationTemplateId number(30,0) not null primary key,
	groupId number(30,0),
	companyId number(30,0),
	userId number(30,0),
	userName VARCHAR2(75 CHAR) null,
	createDate timestamp null,
	modifiedDate timestamp null,
	calendarId number(30,0),
	notificationType VARCHAR2(75 CHAR) null,
	notificationTypeSettings VARCHAR2(75 CHAR) null,
	notificationTemplateType VARCHAR2(75 CHAR) null,
	subject VARCHAR2(75 CHAR) null,
	body clob null
);

create table CalendarResource (
	uuid_ VARCHAR2(75 CHAR) null,
	calendarResourceId number(30,0) not null primary key,
	groupId number(30,0),
	companyId number(30,0),
	userId number(30,0),
	userName VARCHAR2(75 CHAR) null,
	createDate timestamp null,
	modifiedDate timestamp null,
	resourceBlockId number(30,0),
	classNameId number(30,0),
	classPK number(30,0),
	classUuid VARCHAR2(75 CHAR) null,
	code_ VARCHAR2(75 CHAR) null,
	name varchar2(4000) null,
	description varchar2(4000) null,
	active_ number(1, 0)
);
