Examples
Here are some examples of entity relationship diagrams (ERDs) you can create in Eraser:
Chat App
users [icon: user, color: blue] {
id string pk
displayName string
team_role string
teams string
}
teams [icon: users, color: blue] {
id string pk
name string
}
workspaces [icon: home] {
id string
createdAt timestamp
folderId string
teamId string
}
folders [icon: folder] {
id string
name string
}
chat [icon: message-circle, color: green] {
duration number
startedAt timestamp
endedAt timestamp
workspaceId string
}
invite [icon: mail, color: green] {
inviteId string
type string
workspaceId string
inviterId string
}
users.teams <> teams.id
workspaces.folderId > folders.id
workspaces.teamId > teams.id
chat.workspaceId > workspaces.id
invite.workspaceId > workspaces.id
invite.inviterId > users.id
Open in Eraser to duplicate.
Calendar Booking App
User [icon: user] {
id Int pk
username String
email String
avatar String
createdDate DateTime
}
Booking [icon: clock] {
id Int pk
userId Int
title String
startTime DateTime
endTime DateTime
location String
eventTypeId Int
destinationCalendarId Int
}
EventType [icon: list] {
id Int pk
userId Int
teamId Int
hidden Boolean
length Int
}
ApiKey [icon: key]{
id String pk
userId Int
appId String
hashedKey String
}
App [icon: grid] {
slug String
dirName String
keys Json
createdAt DateTime
}
Webhook [icon: link] {
id String pk
userId Int
appId String
active Boolean
}
DestinationCalender [icon: calendar] {
id Int pk
userId Int
integration String
eventTypeId Int
}
// Booking.eventtType < EventType.id
Webhook.appId > App.slug
Webhook.userId > User.id
// Webhook.eventTypeId > EventType.id
App.slug > ApiKey.appId
User.id < Booking.userId
EventType.userId <> User.id
User.id > ApiKey.userId
DestinationCalender.id > Booking.destinationCalendarId
DestinationCalender.userId < User.id
DestinationCalender.eventTypeId < EventType.id
Open in Eraser to duplicate.
Form Builder App
User [icon: user] {
id Int
firstname String
lastname String
email String
emailVerified DateTime
}
Form [icon: check-square] {
id String
ownerId Int
name String
formType FormType
createdAt DateTime
}
Pipeline [icon: filter] {
id String
name String
formId String
events PipelineEvent
createdAt DateTime
}
SessionEvent [icon: zap]{
id String
submissionSessionId String
type String
createdAt DateTime
}
SubmissionSession [icon: clock]{
id String
formId String
createdAt DateTime
}
NoCodeForm [icon: check-square] {
id String
published Boolean
closed Boolean
formId String
}
User.id < Form.ownerId
Form.id < Pipeline.formId
Form.id < SubmissionSession.formId
Form.id < NoCodeForm.formId
SubmissionSession.id < SessionEvent.submissionSessionId
Open in Eraser to duplicate.
Updated 7 months ago