this repo has no description
at main 19 lines 646 B view raw
1import { sqliteTable, text, integer, index } from "drizzle-orm/sqlite-core"; 2 3export const likes = sqliteTable( 4 "likes", 5 { 6 id: integer("id").primaryKey({ autoIncrement: true }), 7 atUri: text("at_uri").notNull().unique(), 8 subjectRef: text("subject_ref").notNull(), 9 did: text("did").notNull(), 10 createdAt: integer("createdAt", { mode: "timestamp" }), 11 indexedAt: integer("indexedAt", { mode: "timestamp" }).$defaultFn( 12 () => new Date(), 13 ), 14 }, 15 (table) => [index("idx_likes_subject_ref").on(table.subjectRef)], 16); 17 18export type Likes = typeof likes.$inferSelect; 19export type NewLike = typeof likes.$inferInsert;