Skip to content

Instantly share code, notes, and snippets.

@as3k
Created October 10, 2024 03:38
Show Gist options
  • Save as3k/6610db13adc5892b1afb72ee10bb7def to your computer and use it in GitHub Desktop.
Save as3k/6610db13adc5892b1afb72ee10bb7def to your computer and use it in GitHub Desktop.
503dtla Database Diagram
# Modify this code to update the DB schema diagram.
# To reset the sample schema, replace everything with
# two dots ('..' - without quotes).
Users
---
id pk bigint
name varchar index
email varchar
phone null varchar
role bigint fk >- UserRoles.id
created timestamp
updated timestamp
UserRoles
---
id pk bigint
name varchar index
created timestamp
updated timestamp
ProductionTypes
---
id pk bigint
name varchar index
created timestamp
updated timestamp
BookingSources
---
id pk bigint
name varchar index
url varchar
created timestamp
updated timestamp
Guests
---
id pk bigint
name varchar index
email varchar
phone null varchar
guestsListId bigint fk >- GuestLists.id
appointmentsId bigint fk >- Appointments.id
bookingsId bigint fk >- Bookings.id
guestTypeId bigint fk >- GuestTypes.id
created timestamp
updated timestamp
GuestTypes
---
id pk bigint
type varchar index
created timestamp
updated timestamp
GuestLists
---
id pk bigint
inquiriesId bigint fk >- Inquiries.id
bookingsId bigint fk >- Bookings.id
created timestamp
updated timestamp
Contacts
---
id pk bigint
name varchar index
email varchar
phone null varchar
inquiriesId bigint fk >- Inquiries.id
bookingsId bigint fk >- Bookings.id
created timestamp
updated timestamp
Bookings
---
id pk bigint
bookingStageID bigint fk >- BookingStages.id
productionType bigint fk >- ProductionTypes.id
contactId bigint fk >- Contacts.id
ownerId bigint fk >- Users.id
bookingSource bigint fk >- BookingSources.id
details varchar
created timestamp
updated timestamp
BookingStages
---
id pk bigint
name varchar index
created timestamp
updated timestamp
Inquiries
---
id pk bigint
stage bigint fk >- InquiryStages.id
productionType bigint fk >- ProductionTypes.id
contactId bigint fk >- Contacts.id
ownerId bigint fk >- Users.id
firstFollowUp timestamp null
lastFollowUp timestamp null
bookingSource bigint fk >- BookingSources.id
details varchar null
created timestamp
updated timestamp
InquiryStages
---
id pk bigint
name varchar index
created timestamp
updated timestamp
Locations
---
id pk bigint
name varchar index
address varchar
city varchar
state varchar
zip integer
owner bigint fk >- Users.id
avatar varchar
created timestamp
updated timestamp
LocationAddOns
---
id pk bigint
locationId bigint fk >- Locations.id
created timestamp
updated timestamp
LocationAddOnItems
---
id pk bigint
locationAddOnsId bigint fk >- LocationAddOns.id
name varchar
price integer
description varchar
created timestamp
updated timestamp
Checklists
---
id pk bigint
locationId bigint fk >- Locations.id
created timestamp
updated timestamp
ChecklistItems
---
id pk bigint
checklistId bigint fk >- Checklists.id
itemTypeId bigint fk >- ChecklistItemsType.id
description varchar
completed boolean
created timestamp
updated timestamp
ChecklistItemsType
---
id pk bigint
type varchar
created timestamp
updated timestamp
AppointmentList
-
id pk bigint
inquiryId bigint fk >- Inquiries.id
bookingId bigint fk >- Bookings.id
created timestamp
updated timestamp
Appointments
-
id pk bigint
locationId bigint fk >- Locations.id
appointmentListId bigint fk >- AppointmentList.id
contactId bigint fk >- Contacts.id
ownerId bigint fk >- Users.id
created timestamp
updated timestamp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment