create table Calendar (
	uuid_ varchar(75) null,
	calendarId bigint not null primary key,
	groupId bigint,
	companyId bigint,
	userId bigint,
	userName varchar(75) null,
	createDate date null,
	modifiedDate date null,
	resourceBlockId bigint,
	calendarResourceId bigint,
	name long varchar null,
	description long varchar null,
	timeZoneId varchar(75) null,
	color integer,
	defaultCalendar boolean,
	enableComments boolean,
	enableRatings boolean
);

create table CalendarBooking (
	uuid_ varchar(75) null,
	calendarBookingId bigint not null primary key,
	groupId bigint,
	companyId bigint,
	userId bigint,
	userName varchar(75) null,
	createDate date null,
	modifiedDate date null,
	resourceBlockId bigint,
	calendarId bigint,
	calendarResourceId bigint,
	parentCalendarBookingId bigint,
	vEventUid varchar(255) null,
	title long varchar null,
	description long varchar null,
	location long varchar null,
	startTime bigint,
	endTime bigint,
	allDay boolean,
	recurrence long varchar null,
	firstReminder bigint,
	firstReminderType varchar(75) null,
	secondReminder bigint,
	secondReminderType varchar(75) null,
	status integer,
	statusByUserId bigint,
	statusByUserName varchar(75) null,
	statusDate date null
);

create table CalendarNotificationTemplate (
	uuid_ varchar(75) null,
	calendarNotificationTemplateId bigint not null primary key,
	groupId bigint,
	companyId bigint,
	userId bigint,
	userName varchar(75) null,
	createDate date null,
	modifiedDate date null,
	calendarId bigint,
	notificationType varchar(75) null,
	notificationTypeSettings varchar(75) null,
	notificationTemplateType varchar(75) null,
	subject varchar(75) null,
	body long varchar null
);

create table CalendarResource (
	uuid_ varchar(75) null,
	calendarResourceId bigint not null primary key,
	groupId bigint,
	companyId bigint,
	userId bigint,
	userName varchar(75) null,
	createDate date null,
	modifiedDate date null,
	resourceBlockId bigint,
	classNameId bigint,
	classPK bigint,
	classUuid varchar(75) null,
	code_ varchar(75) null,
	name long varchar null,
	description long varchar null,
	active_ boolean
);
