This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

1import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core"; 2 3// Define the takes table 4export const takes = sqliteTable("takes", { 5 id: text("id").primaryKey(), 6 userId: text("user_id").notNull(), 7 ts: text("ts"), 8 status: text("status").notNull().default("active"), // active, paused, waitingUpload, completed 9 elapsedTimeMs: integer("elapsed_time_ms").notNull().default(0), 10 targetDurationMs: integer("target_duration_ms").notNull(), 11 periods: text("periods").notNull(), // JSON string of time periods 12 lastResumeAt: integer("last_resume_at", { mode: "timestamp" }), 13 createdAt: integer("created_at", { mode: "timestamp" }).$defaultFn( 14 () => new Date(), 15 ), 16 completedAt: integer("completed_at", { mode: "timestamp" }), 17 takeUploadedAt: integer("take_uploaded_at", { mode: "timestamp" }), 18 takeUrl: text("take_url"), 19 multiplier: text("multiplier").notNull().default("1.0"), 20 notes: text("notes"), 21 description: text("description"), 22 notifiedLowTime: integer("notified_low_time", { mode: "boolean" }).default( 23 false, 24 ), // has user been notified about low time 25 notifiedPauseExpiration: integer("notified_pause_expiration", { 26 mode: "boolean", 27 }).default(false), // has user been notified about pause expiration 28});