Last active
February 15, 2024 23:40
-
-
Save tpatel/809e37327e556f45028baebbe09a57e6 to your computer and use it in GitHub Desktop.
A draft schema for https://twitter.com/MostlyTechPod/status/1758124189909712907
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A person that can login to the SaaS | |
model User { | |
id String @id @unique @default(cuid()) | |
name String? | |
email String? | |
Member Member[] | |
} | |
// A workspace of several persons, focused on one podcast | |
model Podcast { | |
id String @id @unique @default(cuid()) | |
name String? | |
description String? | |
apple_url String? | |
spotify_url String? | |
google_url String? | |
pocketcasts_url String? | |
amazon_url String? | |
youtube_url String? | |
castro_url String? | |
castbox_url String? | |
podcastaddict_url String? | |
playerfm_url String? | |
deezer_url String? | |
Member Member[] | |
Topic Topic[] | |
Guest Guest[] | |
Episode Episode[] | |
Card Card[] | |
} | |
// Simple way to link users and podcasts (so you can invite & collaborate) | |
model Member { | |
id String @id @unique @default(cuid()) | |
user_id User @relation(fields: [userId], references: [id]) | |
podcast_id Podcast @relation(fields: [podcastId], references: [id]) | |
userId String | |
podcastId String | |
} | |
// An idea for a new Episode | |
model Topic { | |
id String @id @unique @default(cuid()) | |
name String | |
description String? | |
podcast_id Podcast @relation(fields: [podcastId], references: [id]) | |
podcastId String | |
Episode Episode[] | |
Card Card[] | |
} | |
// Someone you want to invite on the show | |
model Guest { | |
id String @id @unique @default(cuid()) | |
name String | |
phone String? | |
email String? | |
private_notes String? | |
podcast_id Podcast @relation(fields: [podcastId], references: [id]) | |
podcastId String | |
} | |
// A future episode | |
model Episode { | |
id String @id @unique @default(cuid()) | |
name String? | |
topic_id Topic @relation(fields: [topicId], references: [id]) | |
podcast_id Podcast @relation(fields: [podcastId], references: [id]) | |
topicId String | |
podcastId String | |
} | |
// Invite a guest to a future episode | |
model Invitation { | |
id String @id @unique @default(cuid()) | |
note String? | |
episode_id Episode @relation(fields: [episodeId], references: [id]) | |
guest_id Guest @relation(fields: [guestId], references: [id]) | |
episodeId String | |
guestId String | |
} | |
// A card for a trello-like board | |
model Card { | |
id String @id @unique @default(cuid()) | |
title String? | |
description String? | |
topic_id Topic? @relation(fields: [topicId], references: [id]) | |
podcast_id Podcast @relation(fields: [podcastId], references: [id]) | |
topicId String? | |
podcastId String | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment