Generated reference · Data / schema

aphrodite — data model

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

28tables24enums44relations

On this page

The persisted data model of aphrodite, 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.

28Tables
375Columns
24Enums
44FK relations

Tables (28)#

Broadcasterbroadcasters#
id String PKuserId String uniqstageName Stringbio String?avatarUrl String?bannerUrl String?profileVideoUrl String?status BroadcasterStatusverificationStatus VerificationStatusverifiedAt DateTime?ageVerified BooleanidVerified BooleanisOnline BooleanisStreaming BooleanlastSeenAt DateTime?timezone String +25 more
FK: receivedTipsTip · receivedSubscriptionsSubscription · followersFollow
Viewerviewers#
id String PKuserId String uniqdisplayName StringavatarUrl String?ageVerified BooleanageVerifiedAt DateTime?status ViewerStatusisBanned BooleanbanReason String?bannedUntil DateTime?tokenBalance IntlifetimePurchased IntlifetimeSpent IntpreferredCategories String[]showExplicit BooleannotificationsEnabled Boolean +12 more
FK: tipsTip · subscriptionsSubscription · followsFollow
Streamstreams#
id String PKbroadcasterId Stringtitle Stringdescription String?thumbnailUrl String?previewUrl String?status StreamStatusstreamType StreamTypestreamKey String uniqrtmpUrl String?hlsUrl String?webrtcUrl String?isExplicit Booleancategories String[]tags String[]ageRestricted Boolean +17 more
FK: broadcasterBroadcaster · goalsStreamGoal
PrivateShowprivate_shows#
id String PKstreamId Stringstatus PrivateShowStatusshowType PrivateShowTypepricePerMinute IntminimumMinutes IntstartedAt DateTime?endedAt DateTime?duration Int?totalCost Intrequests PrivateShowRequest[]participants PrivateShowParticipant[]createdAt DateTimeupdatedAt DateTime
FK: streamStream
PrivateShowRequestprivate_show_requests#
id String PKshowId StringviewerId Stringstatus PrivateShowRequestStatusrequestedMinutes Intmessage String?createdAt DateTimerespondedAt DateTime?
FK: showPrivateShow · viewerViewer
PrivateShowParticipantprivate_show_participants#
id String PKshowId StringviewerId StringjoinedAt DateTimeleftAt DateTime?duration InttokensSpent Int
FK: showPrivateShow
ViewSessionview_sessions#
id String PKviewerId StringstreamId StringstartedAt DateTimeendedAt DateTime?duration IntipAddress String?userAgent String?deviceType String?
FK: viewerViewer · streamStream
StreamSchedulestream_schedules#
id String PKbroadcasterId Stringtitle String?scheduledStart DateTimescheduledEnd DateTime?isRecurring BooleanrecurrenceRule String?status ScheduleStatusnotificationsSent BooleancreatedAt DateTimeupdatedAt DateTime
FK: broadcasterBroadcaster
StreamGoalstream_goals#
id String PKbroadcasterId StringstreamId String?title Stringdescription String?targetAmount IntcurrentAmount Intstatus GoalStatuscompletedAt DateTime?createdAt DateTimeupdatedAt DateTime
FK: broadcasterBroadcaster · streamStream
Recordingrecordings#
id String PKbroadcasterId StringstreamId String?title Stringdescription String?thumbnailUrl String?videoUrl Stringduration IntfileSize BigIntresolution String?isPublic Booleanprice IntviewCount IntpurchaseCount IntrecordedAt DateTimecreatedAt DateTime
FK: broadcasterBroadcaster · streamStream
Tiptips#
id String PKviewerId StringbroadcasterId StringstreamId String?amount Intmessage String?isAnonymous BooleantipMenuItemId String?deviceTriggered BooleandeviceDuration Int?deviceIntensity Int?platformFee IntbroadcasterShare IntcreatedAt DateTime
FK: viewerViewer · broadcasterBroadcaster · streamStream · tipMenuItemTipMenuItem
TipMenuItemtip_menu_items#
id String PKbroadcasterId Stringlabel Stringdescription String?amount IntsortOrder InttriggerDevice BooleandeviceDuration Int?deviceIntensity Int?devicePattern String?isActive Booleantips Tip[]createdAt DateTimeupdatedAt DateTime
FK: broadcasterBroadcaster
TokenPurchasetoken_purchases#
id String PKviewerId StringtokenAmount IntpriceUsd Intcurrency StringexchangeRate FloatpaymentProvider StringpaymentMethodType String?externalPaymentId String?status PaymentStatusfailureReason String?createdAt DateTimecompletedAt DateTime?
FK: viewerViewer
Payoutpayouts#
id String PKbroadcasterId Stringamount Intcurrency StringpayoutMethod PayoutMethodexternalPayoutId String?payoutDetails Json?status PayoutStatusfailureReason String?periodStart DateTimeperiodEnd DateTimecreatedAt DateTimeprocessedAt DateTime?completedAt DateTime?
FK: broadcasterBroadcaster
Subscriptionsubscriptions#
id String PKviewerId StringbroadcasterId StringtierId Stringstatus SubscriptionStatusprice IntcurrentPeriodStart DateTimecurrentPeriodEnd DateTimenextBillingDate DateTime?autoRenew BooleancancelledAt DateTime?cancellationReason String?totalBilled IntbillingCount IntcreatedAt DateTimeupdatedAt DateTime
FK: viewerViewer · broadcasterBroadcaster · tierSubscriptionTier
SubscriptionTiersubscription_tiers#
id String PKbroadcasterId Stringname Stringdescription String?price IntbillingCycle BillingCyclecolor String?icon String?priority Intfeatures String[]isActive BooleanisPublic BooleanmaxSubscribers Int?subscriptions Subscription[]createdAt DateTimeupdatedAt DateTime
FK: broadcasterBroadcaster
Followfollows#
id String PKviewerId StringbroadcasterId StringnotifyOnLive BooleannotifyOnContent BooleancreatedAt DateTime
FK: viewerViewer · broadcasterBroadcaster
Devicedevices#
id String PKbroadcasterId Stringname StringdeviceType DeviceTypemanufacturer String?model String?connectionType DeviceConnectionTypeconnectionStatus DeviceConnectionStatusdeviceId String?lastConnectedAt DateTime?isActive BooleanallowViewerControl BooleanmaxIntensity IntdefaultIntensity IntsupportedPatterns String[]controls DeviceControl[] +3 more
FK: broadcasterBroadcaster
DeviceGroupdevice_groups#
id String PKbroadcasterId Stringname Stringdescription String?synchronizeIntensity BooleanmasterDeviceId String?members DeviceGroupMember[]createdAt DateTimeupdatedAt DateTime
FK: broadcasterBroadcaster
DeviceGroupMemberdevice_group_members#
id String PKgroupId StringdeviceId StringintensityMultiplier Float
FK: groupDeviceGroup Cascade · deviceDevice Cascade
DeviceControldevice_controls#
id String PKdeviceId StringviewerId StringcontrolType DeviceControlTypeintensity Intduration Int?pattern String?sourceType DeviceControlSourcesourceTipId String?status DeviceControlStatusexecutedAt DateTime?createdAt DateTime
FK: deviceDevice · viewerViewer
ChatMessagechat_messages#
id String PKstreamId StringviewerId Stringcontent StringmessageType ChatMessageTypeisHighlighted BooleantipAmount Int?isDeleted BooleandeletedAt DateTime?deletedBy String?createdAt DateTime
FK: streamStream · viewerViewer
ViewerBlockviewer_blocks#
id String PKbroadcasterId StringviewerId Stringreason String?isPermanent BooleanexpiresAt DateTime?createdAt DateTime
FK: broadcasterBroadcaster · viewerViewer
Notificationnotifications#
id String PKviewerId Stringtype NotificationTypetitle Stringbody String?data Json?isRead BooleanreadAt DateTime?archivedAt DateTime?createdAt DateTime
FK: viewerViewer
PushSubscriptionpush_subscriptions#
id String PKviewerId Stringendpoint String uniqp256dh Stringauth StringuserAgent String?createdAt DateTime
FK: viewerViewer
DirectMessagedirect_messages#
id String PKpairKey StringfromUserId StringtoUserId Stringcontent StringmessageType DmMessageTypemediaUrl String?isRead BooleanreadAt DateTime?hiddenFor String[]createdAt DateTime
UserBlockuser_blocks#
id String PKblockerUserId StringblockedUserId StringcreatedAt DateTime
AnalyticsEventanalytics_events#
id String PKtype Stringtimestamp DateTimeuserId String?creatorId String?streamId String?sessionId String?properties Jsonmetadata Json?createdAt DateTime

Enums (24)#

DmMessageType4 values
TEXTIMAGEVIDEOFILE
BroadcasterStatus5 values
PENDINGACTIVESUSPENDEDBANNEDDELETED
VerificationStatus4 values
UNVERIFIEDPENDINGVERIFIEDREJECTED
ViewerStatus4 values
ACTIVESUSPENDEDBANNEDDELETED
StreamStatus6 values
OFFLINESTARTINGLIVEPAUSEDENDINGENDED
StreamType5 values
PUBLICPRIVATETICKETGROUPFAN_CLUB
PrivateShowStatus4 values
PENDINGACTIVEENDEDCANCELLED
PrivateShowType3 values
ONE_ON_ONEGROUPSPY
PrivateShowRequestStatus4 values
PENDINGACCEPTEDREJECTEDEXPIRED
NotificationType6 values
STREAM_LIVESHOW_STARTINGTIP_RECEIPTSUBSCRIPTIONFOLLOWSYSTEM
ScheduleStatus4 values
SCHEDULEDLIVECOMPLETEDCANCELLED
GoalStatus4 values
ACTIVECOMPLETEDEXPIREDCANCELLED
PaymentStatus6 values
PENDINGPROCESSINGCOMPLETEDFAILEDREFUNDEDCANCELLED
PayoutStatus5 values
PENDINGPROCESSINGCOMPLETEDFAILEDCANCELLED
PayoutMethod4 values
BANK_TRANSFERPAYPALCRYPTOCHECK
SubscriptionStatus5 values
ACTIVEPAUSEDCANCELLEDEXPIREDPAST_DUE
BillingCycle3 values
MONTHLYQUARTERLYYEARLY
DeviceType6 values
VIBRATORROTATORCONSTRICTIONSTROKERMULTI_FUNCTIONOTHER
DeviceConnectionType4 values
BLUETOOTHWIFIUSBNETWORK
DeviceConnectionStatus4 values
DISCONNECTEDCONNECTINGCONNECTEDERROR
DeviceControlType5 values
VIBRATEROTATECONSTRICTPATTERNSTOP
DeviceControlSource5 values
TIPTIP_MENUSUBSCRIPTIONMANUALGOAL
DeviceControlStatus4 values
PENDINGEXECUTINGCOMPLETEDFAILED
ChatMessageType5 values
TEXTTIPSYSTEMEMOTESTICKER