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)#
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 moreid String PKuserId String uniqcreatedAt DateTimeupdatedAt DateTimedisplayName String?firstName String?lastName String?avatarUrl String?bio String?timezone StringpreferredLanguage StringexperienceLevel ExperienceLevelmeditationGoals String[]preferredDuration IntpreferredTime String?FK:
user→User Cascadeid 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 moreFK:
user→User Cascadeid String PKsubscriptionId StringcreatedAt DateTimeamount Intcurrency Stringstatus PaymentStatusplatform PlatformstoreTransactionId String?storeReceiptData String?refundedAt DateTime?refundReason String?FK:
subscription→Subscription Cascadeid String PKuserId StringcreatedAt DateTimeupdatedAt DateTimeplatform PlatformdeviceToken StringdeviceModel String?osVersion String?appVersion String?isActive BooleanlastActiveAt DateTime?FK:
user→User Cascadeid 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 moreid String PKcreatedAt DateTimeupdatedAt DateTimetitle Stringslug String uniqdescription StringlongDescription String?audioUrl StringcoverUrl String?thumbnailUrl String?duration Intcategory MeditationCategoryadditionalCategories MeditationCategory[]tags String[]teacherId StringisPremium Boolean +14 moreFK:
teacher→Teacher · backgroundMusic→AmbientSound · relatedFrom→RelatedMeditation · relatedTo→RelatedMeditationid String PKcreatedAt DateTimeupdatedAt DateTimename Stringslug String uniqdescription String?audioUrl StringiconUrl String?category SoundCategoryduration IntisLoop BooleanisPremium BooleansortOrder Intmeditations Meditation[]id String PKcreatedAt DateTimeupdatedAt DateTimetitle Stringslug String uniqdescription StringcoverUrl String?teacherId Stringcategory MeditationCategorytags String[]level DifficultyLevelisPremium BooleantotalDuration IntlessonCount IntpublishedAt DateTime?isPublished Boolean +5 moreFK:
teacher→Teacherid String PKcourseId StringcreatedAt DateTimeupdatedAt DateTimetitle Stringdescription String?number Intduration Intcontent LessonContent[]progress UserProgress[]FK:
course→Course Cascadeid String PKlessonId StringcreatedAt DateTimecontentType LessonContentTypemeditationId String?textContent String?sortOrder IntFK:
lesson→Lesson Cascade · meditation→Meditationid String PKcreatedAt DateTimeupdatedAt DateTimeslug String uniqtitle Stringsummary StringprimaryDomain Stringdomains String[]origin Stringkind Stringstatus Stringvisibility Stringschedule JsonestimatedDurationMinutes Inttags String[]lastPublishedAt DateTime? +5 moreid String PKuserId StringmeditationId StringcreatedAt DateTimestartedAt DateTimeendedAt DateTime?duration Intcompleted BooleanpercentComplete Floatplatform PlatformdeviceId String?FK:
user→User Cascade · meditation→Meditationid String PKuserId StringcreatedAt DateTimeupdatedAt DateTimecourseId String?lessonId String?status ProgressStatuspercentComplete FloatstartedAt DateTime?completedAt DateTime?currentLessonNumber Int?FK:
user→User Cascade · course→Course Cascade · lesson→Lesson Cascadeid String PKuserId String uniqupdatedAt DateTimecurrentStreak IntcurrentStartDate DateTime?lastActivityDate DateTime?longestStreak IntlongestStreakDate DateTime?totalDays InttotalMinutes InttotalSessions IntweeklyMinutes IntmonthlyMinutes IntweekStartDate DateTime?monthStartDate DateTime?FK:
user→User Cascadeid String PKcreatedAt DateTimename String uniqtitle Stringdescription StringiconUrl String?type AchievementTyperequirement IntsortOrder Intrarity AchievementRarityuserAchievements UserAchievement[]id String PKuserId StringachievementId StringearnedAt DateTimeprogress Int?notified BooleanFK:
user→User Cascade · achievement→Achievementid String PKuserId StringcreatedAt DateTimemeditationId String?courseId String?FK:
user→User Cascade · meditation→Meditation Cascade · course→Course Cascadeid String PKuserId StringmeditationId StringcreatedAt DateTimeupdatedAt DateTimestatus DownloadStatusfileSize Int?localPath String?deviceId String?expiresAt DateTime?FK:
user→User Cascade · meditation→Meditation Cascadeid String PKuserId StringmeditationId StringlistenedAt DateTimeduration Intcompleted BooleanFK:
user→User Cascade · meditation→Meditation Cascadeid String PKuserId StringcreatedAt DateTimetype NotificationTypetitle Stringbody StringimageUrl String?action String?actionData Json?read BooleanreadAt DateTime?sentAt DateTime?platform Platform?FK:
user→User Cascadeid String PKuserId String uniqupdatedAt DateTimenotificationsEnabled BooleanreminderEnabled BooleanreminderTime String?reminderDays Int[]streakNotifications BooleannewContentNotifications BooleanautoPlayNext BooleandownloadWifiOnly BooleandefaultBackgroundSound String?backgroundSoundVolume FloatshareProgress BooleananalyticsEnabled Booleantheme Theme +1 moreFK:
user→User Cascadeid 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 FeedbackStatusFK:
user→User CascadeEnums (18)#
UserStatus4 valuesACTIVESUSPENDEDDELETEDPENDING_VERIFICATIONExperienceLevel3 valuesBEGINNERINTERMEDIATEADVANCEDSubscriptionStatus6 valuesFREETRIALACTIVECANCELLEDEXPIREDGRACE_PERIODSubscriptionPlan4 valuesFREEMONTHLYYEARLYLIFETIMEPlatform3 valuesIOSANDROIDWEBPaymentStatus4 valuesPENDINGCOMPLETEDFAILEDREFUNDEDMeditationCategory12 valuesMEDITATIONSLEEPBREATHINGFOCUSSTRESSMORNINGSELF_COMPASSIONGRATITUDEBODY_SCANSWALKINGKIDSSOUNDSDifficultyLevel3 valuesBEGINNERINTERMEDIATEADVANCEDSoundCategory7 valuesNATURERAINOCEANFORESTAMBIENTWHITE_NOISEMUSICLessonContentType3 valuesMEDITATIONTEXTEXERCISEProgressStatus3 valuesNOT_STARTEDIN_PROGRESSCOMPLETEDAchievementType6 valuesSTREAK_DAYSTOTAL_SESSIONSTOTAL_MINUTESCOURSES_COMPLETEDCATEGORY_MASTERYSPECIALAchievementRarity5 valuesCOMMONUNCOMMONRAREEPICLEGENDARYDownloadStatus5 valuesPENDINGDOWNLOADINGCOMPLETEDFAILEDEXPIREDNotificationType6 valuesREMINDERSTREAKACHIEVEMENTNEW_CONTENTPROMOTIONSYSTEMTheme3 valuesLIGHTDARKSYSTEMFeedbackType5 valuesBUG_REPORTFEATURE_REQUESTCONTENT_RATINGAPP_REVIEWGENERALFeedbackStatus5 valuesPENDINGREVIEWEDIN_PROGRESSRESOLVEDCLOSED