A decentralized music tracking and discovery platform built on AT Protocol 馃幍
at fix/spotify 26 lines 828 B view raw
1import type { InferInsertModel, InferSelectModel } from "drizzle-orm"; 2import { 3 boolean, 4 integer, 5 pgTable, 6 text, 7 timestamp, 8} from "drizzle-orm/pg-core"; 9import users from "./users"; 10 11const spotifyAccounts = pgTable("spotify_accounts", { 12 id: text("xata_id").primaryKey(), 13 xataVersion: integer("xata_version").notNull(), 14 email: text("email").notNull(), 15 userId: text("user_id") 16 .notNull() 17 .references(() => users.id), 18 isBetaUser: boolean("is_beta_user").default(false).notNull(), 19 createdAt: timestamp("xata_createdat").defaultNow().notNull(), 20 updatedAt: timestamp("xata_updatedat").defaultNow().notNull(), 21}); 22 23export type SelectSpotifyAccount = InferSelectModel<typeof spotifyAccounts>; 24export type InsertSpotifyAccount = InferInsertModel<typeof spotifyAccounts>; 25 26export default spotifyAccounts;