Implement setup task for worker admin environment and add new database schema and snapshot files

This commit is contained in:
Nikita
2025-12-24 16:31:01 -08:00
parent 26fa0b0ec9
commit cf4a43779e
19 changed files with 3015 additions and 89 deletions

View File

@@ -297,6 +297,25 @@ export const stream_replays = pgTable("stream_replays", {
export const selectStreamReplaySchema = createSelectSchema(stream_replays)
export type StreamReplay = z.infer<typeof selectStreamReplaySchema>
// =============================================================================
// Stream Comments (live chat for streams)
// =============================================================================
export const stream_comments = pgTable("stream_comments", {
id: uuid("id").primaryKey().defaultRandom(),
stream_username: text("stream_username").notNull(), // Username of the streamer
user_id: text("user_id")
.notNull()
.references(() => users.id, { onDelete: "cascade" }),
content: text("content").notNull(),
created_at: timestamp("created_at", { withTimezone: true })
.defaultNow()
.notNull(),
})
export const selectStreamCommentSchema = createSelectSchema(stream_comments)
export type StreamComment = z.infer<typeof selectStreamCommentSchema>
// =============================================================================
// Stripe Billing
// =============================================================================