Generated reference · Data / schema

tara — data model

Tables, columns, enums, and foreign-key relations — generated from the committed Prisma schema.

24tables18enums32relations

On this page

The persisted data model of tara, generated from its schema.prisma — every table (Prisma model + its Postgres @@map name), its columns, the enums it defines, and the foreign-key edges that wire them together.

24Tables
324Columns
18Enums
32FK relations

Tables (24)#

Userusers#
id String PKemail String uniqcreatedAt DateTimeupdatedAt DateTimepasswordHash String?emailVerified BooleanlastLoginAt DateTime?appleId String? uniqgoogleId String? uniqstatus UserStatusdeletedAt DateTime?suspendedAt DateTime?suspendReason String?profile Profile?subscription Subscription?devices Device[] +10 more
Profileprofiles#
id String PKuserId String uniqcreatedAt DateTimeupdatedAt DateTimedisplayName String?firstName String?lastName String?avatarUrl String?bio String?timezone StringpreferredLanguage StringexperienceLevel ExperienceLevelmeditationGoals String[]preferredDuration IntpreferredTime String?
FK: userUser Cascade
Subscriptionsubscriptions#
id String PKuserId String uniqcreatedAt DateTimeupdatedAt DateTimestatus SubscriptionStatusplan SubscriptionPlanplatform Platform?storeProductId String?storeTransactionId String?startedAt DateTime?expiresAt DateTime?cancelledAt DateTime?trialStartedAt DateTime?trialEndsAt DateTime?trialUsed BooleangracePeriodEndsAt DateTime? +1 more
FK: userUser Cascade
Paymentpayments#
id String PKsubscriptionId StringcreatedAt DateTimeamount Intcurrency Stringstatus PaymentStatusplatform PlatformstoreTransactionId String?storeReceiptData String?refundedAt DateTime?refundReason String?
FK: subscriptionSubscription Cascade
Devicedevices#
id String PKuserId StringcreatedAt DateTimeupdatedAt DateTimeplatform PlatformdeviceToken StringdeviceModel String?osVersion String?appVersion String?isActive BooleanlastActiveAt DateTime?
FK: userUser Cascade
Teacherteachers#
id String PKcreatedAt DateTimeupdatedAt DateTimename Stringslug String uniqbio StringfullBio String?imageUrl String?credentials String[]specializations String[]websiteUrl String?instagramUrl String?featured BooleanisActive BooleansortOrder Intmeditations Meditation[] +1 more
Meditationmeditations#
id String PKcreatedAt DateTimeupdatedAt DateTimetitle Stringslug String uniqdescription StringlongDescription String?audioUrl StringcoverUrl String?thumbnailUrl String?duration Intcategory MeditationCategoryadditionalCategories MeditationCategory[]tags String[]teacherId StringisPremium Boolean +14 more
FK: teacherTeacher · backgroundMusicAmbientSound · relatedFromRelatedMeditation · relatedToRelatedMeditation
RelatedMeditationrelated_meditations#
id String PKfromMeditationId StringtoMeditationId StringsortOrder Int
FK: fromMeditationMeditation Cascade · toMeditationMeditation Cascade
AmbientSoundambient_sounds#
id String PKcreatedAt DateTimeupdatedAt DateTimename Stringslug String uniqdescription String?audioUrl StringiconUrl String?category SoundCategoryduration IntisLoop BooleanisPremium BooleansortOrder Intmeditations Meditation[]
Coursecourses#
id String PKcreatedAt DateTimeupdatedAt DateTimetitle Stringslug String uniqdescription StringcoverUrl String?teacherId Stringcategory MeditationCategorytags String[]level DifficultyLevelisPremium BooleantotalDuration IntlessonCount IntpublishedAt DateTime?isPublished Boolean +5 more
FK: teacherTeacher
Lessonlessons#
id String PKcourseId StringcreatedAt DateTimeupdatedAt DateTimetitle Stringdescription String?number Intduration Intcontent LessonContent[]progress UserProgress[]
FK: courseCourse Cascade
LessonContentlesson_content#
id String PKlessonId StringcreatedAt DateTimecontentType LessonContentTypemeditationId String?textContent String?sortOrder Int
FK: lessonLesson Cascade · meditationMeditation
Ritualrituals#
id String PKcreatedAt DateTimeupdatedAt DateTimeslug String uniqtitle Stringsummary StringprimaryDomain Stringdomains String[]origin Stringkind Stringstatus Stringvisibility Stringschedule JsonestimatedDurationMinutes Inttags String[]lastPublishedAt DateTime? +5 more
MeditationSessionmeditation_sessions#
id String PKuserId StringmeditationId StringcreatedAt DateTimestartedAt DateTimeendedAt DateTime?duration Intcompleted BooleanpercentComplete Floatplatform PlatformdeviceId String?
FK: userUser Cascade · meditationMeditation
UserProgressuser_progress#
id String PKuserId StringcreatedAt DateTimeupdatedAt DateTimecourseId String?lessonId String?status ProgressStatuspercentComplete FloatstartedAt DateTime?completedAt DateTime?currentLessonNumber Int?
FK: userUser Cascade · courseCourse Cascade · lessonLesson Cascade
Streakstreaks#
id String PKuserId String uniqupdatedAt DateTimecurrentStreak IntcurrentStartDate DateTime?lastActivityDate DateTime?longestStreak IntlongestStreakDate DateTime?totalDays InttotalMinutes InttotalSessions IntweeklyMinutes IntmonthlyMinutes IntweekStartDate DateTime?monthStartDate DateTime?
FK: userUser Cascade
Achievementachievements#
id String PKcreatedAt DateTimename String uniqtitle Stringdescription StringiconUrl String?type AchievementTyperequirement IntsortOrder Intrarity AchievementRarityuserAchievements UserAchievement[]
UserAchievementuser_achievements#
id String PKuserId StringachievementId StringearnedAt DateTimeprogress Int?notified Boolean
FK: userUser Cascade · achievementAchievement
Favoritefavorites#
id String PKuserId StringcreatedAt DateTimemeditationId String?courseId String?
FK: userUser Cascade · meditationMeditation Cascade · courseCourse Cascade
Downloaddownloads#
id String PKuserId StringmeditationId StringcreatedAt DateTimeupdatedAt DateTimestatus DownloadStatusfileSize Int?localPath String?deviceId String?expiresAt DateTime?
FK: userUser Cascade · meditationMeditation Cascade
HistoryEntryhistory#
id String PKuserId StringmeditationId StringlistenedAt DateTimeduration Intcompleted Boolean
FK: userUser Cascade · meditationMeditation Cascade
Notificationnotifications#
id String PKuserId StringcreatedAt DateTimetype NotificationTypetitle Stringbody StringimageUrl String?action String?actionData Json?read BooleanreadAt DateTime?sentAt DateTime?platform Platform?
FK: userUser Cascade
UserSettingsuser_settings#
id String PKuserId String uniqupdatedAt DateTimenotificationsEnabled BooleanreminderEnabled BooleanreminderTime String?reminderDays Int[]streakNotifications BooleannewContentNotifications BooleanautoPlayNext BooleandownloadWifiOnly BooleandefaultBackgroundSound String?backgroundSoundVolume FloatshareProgress BooleananalyticsEnabled Booleantheme Theme +1 more
FK: userUser Cascade
Feedbackfeedback#
id String PKuserId StringcreatedAt DateTimetype FeedbackTyperating Int?title String?body String?meditationId String?courseId String?appVersion String?platform Platform?responseBody String?respondedAt DateTime?respondedBy String?status FeedbackStatus
FK: userUser Cascade

Enums (18)#

UserStatus4 values
ACTIVESUSPENDEDDELETEDPENDING_VERIFICATION
ExperienceLevel3 values
BEGINNERINTERMEDIATEADVANCED
SubscriptionStatus6 values
FREETRIALACTIVECANCELLEDEXPIREDGRACE_PERIOD
SubscriptionPlan4 values
FREEMONTHLYYEARLYLIFETIME
Platform3 values
IOSANDROIDWEB
PaymentStatus4 values
PENDINGCOMPLETEDFAILEDREFUNDED
MeditationCategory12 values
MEDITATIONSLEEPBREATHINGFOCUSSTRESSMORNINGSELF_COMPASSIONGRATITUDEBODY_SCANSWALKINGKIDSSOUNDS
DifficultyLevel3 values
BEGINNERINTERMEDIATEADVANCED
SoundCategory7 values
NATURERAINOCEANFORESTAMBIENTWHITE_NOISEMUSIC
LessonContentType3 values
MEDITATIONTEXTEXERCISE
ProgressStatus3 values
NOT_STARTEDIN_PROGRESSCOMPLETED
AchievementType6 values
STREAK_DAYSTOTAL_SESSIONSTOTAL_MINUTESCOURSES_COMPLETEDCATEGORY_MASTERYSPECIAL
AchievementRarity5 values
COMMONUNCOMMONRAREEPICLEGENDARY
DownloadStatus5 values
PENDINGDOWNLOADINGCOMPLETEDFAILEDEXPIRED
NotificationType6 values
REMINDERSTREAKACHIEVEMENTNEW_CONTENTPROMOTIONSYSTEM
Theme3 values
LIGHTDARKSYSTEM
FeedbackType5 values
BUG_REPORTFEATURE_REQUESTCONTENT_RATINGAPP_REVIEWGENERAL
FeedbackStatus5 values
PENDINGREVIEWEDIN_PROGRESSRESOLVEDCLOSED